Skip to main content
Glama

Índice de un Markdown

markdown-toc
Read-onlyIdempotent

Extrae los títulos de un Markdown y genera una tabla de contenido anidada con anclas estilo GitHub. Cuándo: hay que leer, construir o revisar con exactitud una URL, una cabecera HTTP, un token, una versión, un rango de IP, un documento HTML o Markdown o un archivo para agentes. No para: construir una tabla Markdown (markdown-table). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Extracts ATX headings (#…######, skipping code fences) and builds a nested Markdown table of contents with GitHub-style anchors, deduplicating repeated anchors. When: a URL, HTTP header, token, version string, IP range, HTML or Markdown document or agent-readiness file has to be parsed, built or checked exactly. Not for: building a GitHub-flavored Markdown table from an array of objects (markdown-table). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
markdownYesMarkdown (string; required).
max_levelNoDeepest heading level (integer; optional; default 3; min 1; max 6).

Output Schema

NameRequiredDescriptionDefault
headingsNo
markdownNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / markdown / examples
      Added value: +[
      +  "# Guía\n## Instalación\n```\n# not a heading\n```\n## Uso rápido\n### Ejemplo\n## Uso rápido"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Extracts ATX headings (#…######, skipping code fences) and builds a nested Markdown table of contents with GitHub-style anchors, deduplicating repeated anchors. When: a URL, HTTP header, token, version string, IP range, HTML or Markdown document or agent-readiness file has to be parsed, built or checked exactly. Not for: building a GitHub-flavored Markdown table from an array of objects (markdown-table). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare read-only, non-destructive, idempotent, and closed-world behavior. The description adds useful behavioral context beyond annotations: no side effects, no network access, no stored state, deterministic output, and stated time/result limits. The 64 KB input limit is potentially inconsistent with the schema's 1 MB markdown maxLength, but it is still informative.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence is well front-loaded, but the description is bloated by a duplicated full English block and a generic 'Cuándo' list that is unrelated to TOC generation. Those passages do not earn their place and reduce clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, has an output schema, and has rich annotations. The description covers purpose, one exclusion, side effects, determinism, and limits, which is nearly complete for correct invocation, though the misleading usage list and the 64 KB versus 1 MB limit discrepancy keep it from being fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both markdown and max_level are already documented in the schema. The description does not add parameter-specific semantics such as how max_level changes output depth, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: it extracts ATX headings, skipping code fences, and builds a nested Markdown table of contents with GitHub-style anchors. It also explicitly distinguishes the tool from markdown-table, so an agent can tell them apart without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The explicit 'No para' exclusion correctly routes away from markdown-table, but the positive 'Cuándo' guidance is a misleading boilerplate list about URLs, HTTP headers, tokens, IP ranges, HTML documents, and agent-readiness files. It does not clearly say to use this tool specifically when a Markdown table of contents is needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources