Skip to main content
Glama

get_document_outline

Read-only

Get a document's section hierarchy (headings only) to locate and navigate content precisely, reducing token usage by avoiding full-file reads.

Instructions

Get the section hierarchy for a single document file, without content. Headings only, no content. Read a section with get_section.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository identifier
doc_pathYesPath to the document within the repository (e.g., 'README.md')
Behavior3/5

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

Annotations declare readOnlyHint=true, so the description doesn't need to restate that. It adds behavioral context by stating the tool returns only headings (no content), which is beyond the schema. However, it doesn't disclose details like whether the hierarchy is nested by level, what the return structure looks like, or if it follows a specific document format, which the agent might need to infer.

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?

The description is three short sentences: it states what it does, what it returns (headings only), and points to the alternative for content. Every sentence earns its place, no fluff.

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

Completeness3/5

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

For a simple read-only tool with two parameters and no output schema, the description is mostly adequate. However, with no output schema, the agent doesn't know the structure of the returned hierarchy (e.g., whether it's a tree or flat list, if it includes nesting levels). Since the description is the only source of return information, a bit more detail would be helpful, but the core purpose is clear.

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 (repo and doc_path) are described in the schema. The description adds no additional parameter semantics beyond what's in the schema, which is acceptable per the baseline. It doesn't clarify repo format or doc_path specifics, but the schema is sufficient.

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 clearly states the tool retrieves the section hierarchy for a single document file without content, using specific verbs ('Get the section hierarchy') and resource ('single document file'). It also distinguishes from content-fetching tools by explicitly noting 'Headings only, no content' and directs users to get_section for content.

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?

The description clearly indicates when to use it (to get structure without content) and provides an alternative tool (get_section) for reading content. It does not explicitly state when not to use it, but the differentiation is clear. It could mention using get_toc or get_toc_tree for table-of-contents views, but the core usage context is well-defined.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jgravelle/jdocmunch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server