Skip to main content
Glama

get_toc

Read-only

Retrieve a flat table of contents for all sections in a repository, sorted by document order. Filter by path_glob to scope results; content is excluded.

Instructions

Get a flat table of contents for all sections in a repo, sorted by document order. Content is excluded — use get_section to retrieve content. Scope with path_glob; for a SINGLE document use get_document_outline (this tool has no doc_path parameter).

Input Schema

NameRequiredDescriptionDefault
repoYesRepository identifier (owner/repo or just repo name)
limitNov1.147+ — return at most this many sections, starting at offset. Default: all, subject to the response ceiling (JDOCMUNCH_RESPONSE_MAX_BYTES, 1 MiB), over which the call is refused, never truncated. sections_total, sections_truncated and next_offset are always present.
offsetNov1.147+ — sections to skip. Pass the previous response's next_offset. Default 0.
path_globNov1.36+ — fnmatch glob restricting results to matching doc_paths (e.g. 'api/**/*.md', 'reference/*'). Default: no filter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.147.0
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "v1.147+ — return at most this many sections, starting at offset. Default: all, subject to the response ceiling (JDOCMUNCH_RESPONSE_MAX_BYTES, 1 MiB), over which the call is refused, never truncated. sections_total, sections_truncated and next_offset are always present.",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "v1.147+ — sections to skip. Pass the previous response's next_offset. Default 0.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Addedv1.118.0
  3. Removedv1.99.0
  4. First observedv1.66.3

TDQS

A4.5/5.0
Behavior4/5

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

The readOnlyHint annotation already signals a safe read operation. The description adds useful behavioral detail beyond that: content is excluded, output is flat and sorted by document order, and there is no doc_path parameter. It still does not describe the exact return fields, but for a list-oriented read tool that is a minor gap.

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

Conciseness5/5

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

Two sentences, no filler, and the core purpose is front-loaded. The exclusion and sibling guidance are packed into the same compact paragraph without losing clarity.

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

Completeness5/5

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

For this tool's complexity, the description is complete: it defines scope, return shape ('flat table of contents'), exclusions, and alternatives. Since no output schema exists, the description adequately tells the agent what to expect without needing to enumerate every field.

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 the schema already documents repo, limit, offset, and path_glob. The description reinforces path_glob scoping and the absence of doc_path, but does not add syntax or format guidance beyond what the schema provides. 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?

States a specific verb and resource: 'Get a flat table of contents for all sections in a repo, sorted by document order.' It also distinguishes the tool from the closest siblings by excluding content and naming get_section and get_document_outline as alternatives.

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

Usage Guidelines5/5

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

Provides explicit routing: use get_section to retrieve content, use get_document_outline for a single document, and use path_glob to scope the result. It even notes the absence of a doc_path parameter, which prevents misuse.

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