Skip to main content
Glama

get_document_outline

Return a document's heading structure so you can navigate large files and locate sections before extracting or editing content. Section indices align with '#N' edit targets.

Instructions

Return the heading structure (table of contents) of a document.

Use this to navigate a large document before extracting specific sections: the returned indices line up with edit_document's '#N' target notation.

Returns a dictionary with:

  • sections: list of {index, level, heading}

  • total: number of headings returned

Input Schema

NameRequiredDescriptionDefault
docYesDocument to outline: file path (within read allowlist), data URI, base64, or inline content. REQUIRED.
max_levelNoDeepest heading level to include, 1-6 (default: 6 = all levels).
format_hintNoOptional format hint for ambiguous/extensionless sources (e.g. 'pdf', 'docx', 'html').

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.19.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the burden and does disclose one non-obvious behavioral trait: returned indices line up with edit_document's '#N' addressing, which is not inferable from the schema. It is silent on failure behavior for unsupported formats or size limits, and the return-value section partly duplicates the existing output schema.

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?

Front-loaded with the core action, then usage, then return shape in a scannable list; no filler sentences. The 'Returns a dictionary with' block is somewhat redundant against the declared output schema, costing a point on tightness.

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?

For a 3-parameter read tool with full schema coverage and an output schema, the description covers purpose, navigation use case, and cross-tool index semantics. Remaining gaps are minor: no note on unsupported formats or how errors surface.

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 doc, max_level, and format_hint are already well documented in the input schema. The description adds no parameter-level meaning (e.g., when to set format_hint or how max_level affects indices), so baseline 3 applies.

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 concrete verb and resource: 'Return the heading structure (table of contents) of a document.' The parenthetical clarifies the concept and the follow-up sentence scopes it to navigation of large documents, which separates it from read_document_as_markdown (full content) and search_documents (query match) without needing 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 Guidelines4/5

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

Explicit when-to-use: 'navigate a large document before extracting specific sections,' and it points at a downstream consumer (edit_document's '#N' notation). It stops short of naming an alternative sibling or a case where this tool is the wrong choice, so it is clear context without explicit exclusions.

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