Skip to main content
Glama

doc_table_of_contents

Returns a structured table of contents for indexed documentation, listing every heading with section IDs and hierarchy, filterable by document path to navigate docs without reading full text.

Instructions

Returns a structured table of contents for indexed documentation. Lists every heading with section IDs and hierarchy. Filterable by document path.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repo": "<repo>"
    },
    "name": "doc_table_of_contents"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name (as shown in list_repos)
doc_pathNoFilter to a specific document

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.2

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the burden. It implies a read-only result ('Returns', 'Lists') and that the repo must already be 'indexed', but says nothing about behavior for an unindexed repo, output size limits for large docs, or whether headings include content anchors.

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

Conciseness4/5

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

Three short sentences, front-loaded with the core purpose and follow-on detail. Slight redundancy between the first sentence and 'Lists every heading with section IDs and hierarchy', but nothing is wasted.

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?

With no output schema, the description does the necessary work by sketching the return shape (headings, section IDs, hierarchy). For a two-parameter read tool this is close to complete; only the unindexed-repo case and full-vs-filtered scope are unaddressed.

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 parameters are documented in the schema and the baseline is 3. The sentence 'Filterable by document path' reinforces doc_path but adds no matching semantics (exact path vs. prefix vs. folder) or guidance on what omitting it returns.

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

Purpose4/5

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

Specific verb and resource: 'Returns a structured table of contents for indexed documentation', elaborated as 'every heading with section IDs and hierarchy'. It does not, however, distinguish itself from the similarly purposed sibling doc_tree, leaving the agent to infer the difference.

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

Usage Guidelines3/5

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

Usage is only implied — an agent can guess this is the overview/orientation tool before reading a section. There is no explicit when-to-use or when-not-to-use, and no routing to doc_tree, find_docs, or read_doc_section, all of which plausibly overlap.

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