Skip to main content
Glama

list_headings

Extract all headings from a markdown file to create a structured table of contents for navigation and content overview.

Instructions

List all headings (# through ######) in a markdown file as a table of contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesPath to the markdown file
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It states what the tool does but doesn't disclose how it behaves—such as error handling for invalid files, output format details, or whether it reads files safely. This leaves significant gaps for a tool that interacts with file systems.

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 a single, well-structured sentence that efficiently conveys the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly.

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?

Given the tool's low complexity (one parameter, no annotations, no output schema), the description is adequate but incomplete. It specifies the input type (markdown file) and output concept (table of contents) but lacks details on output format or error conditions, which are important for a file-reading tool with no structured output schema.

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?

The schema description coverage is 100%, so the schema already documents the single 'file' parameter as a path. The description adds no additional meaning beyond implying markdown files, which is redundant with the tool's stated purpose. This meets the baseline for high schema coverage.

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 specific action ('List all headings') and resource ('in a markdown file') with precise scope ('# through ###### as a table of contents'). It distinguishes itself from sibling tools like 'get_section' or 'search_docs' by focusing exclusively on heading extraction rather than broader document operations.

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?

The description implies usage for markdown files needing a table of contents, but provides no explicit guidance on when to use this tool versus alternatives like 'get_section' for specific content or 'search_docs' for broader searches. It lacks any mention of prerequisites or exclusions.

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/ofershap/mcp-server-markdown'

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