# AgentShelf Markdown Table of Contents Generator

> AgentShelf Markdown Table of Contents Generator is a paid API for AI agents from agentshelf.syntexa.ch, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Generates a markdown heading-based table of contents from a provided markdown document, with no network calls required.

## Facts

- Endpoint: POST https://agentshelf.syntexa.ch/v1/toc-md?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentshelf-markdown-table-of-contents-generator-a607cf27
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QstIps9TvmcPTBeFIshxe

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentshelf-markdown-table-of-contents-generator-a607cf27 -d '<json body>'
```

Example prompt: Can you generate a markdown table of contents from this document? Here's the markdown: '# Introduction
## Background
## Goals
# Methods
## Data Collection
# Results
# Conclusion'

## When to prefer this

Choose this endpoint when you need a deterministic, fast, no-LLM table of contents extracted purely from markdown heading syntax. Ideal when you want a reproducible, structured TOC without any AI interpretation or network-dependent processing. Prefer the free sandbox endpoint POST /v1/sandbox/toc-md first if available; use this paid endpoint when the sandbox is unavailable or rate-limited.

## Known failure modes

- Empty or whitespace-only markdown input returns an error (minLength:1 enforced)
- Input exceeding 100,000 characters is rejected
- Markdown with no headings may return an empty TOC
- Malformed JSON body returns a 400 error
- Payment not included or incorrect amount returns a 402 Payment Required

## How this service works

Call when an agent needs a markdown heading table of contents. No network. Exact $0.001 USDC. Prefer unpaid POST /v1/sandbox/toc-md first.

## Output

Returns a markdown-formatted table of contents derived from the headings (h1–h6) found in the input markdown, typically as a list of anchor-linked entries mirroring the document's heading hierarchy.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "markdown": {
   "type": "string",
   "examples": [
    "# Hello\n\n## World\n"
   ],
   "maxLength": 100000,
   "minLength": 1,
   "description": "Markdown whose ATX headings (# through ######) become a table of contents."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentshelf-markdown-table-of-contents-generator-a607cf27/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentshelf.syntexa.ch](https://www.zero.xyz/host/agentshelf.syntexa.ch/llms.txt)
