Skip to main content
Glama

read_file_outline

List markdown headings with levels and line numbers to preview file structure before reading or editing sections.

Instructions

Return a flat list of markdown headings for one file (level, text, line, byteStart, byteEnd). Read-only; no side effects, auth, or rate limits. Use as a cheap probe before read_section or update_file_section so you don't spend tokens on the full body just to learn what sections exist. Empty outline means the file has no markdown headings (it may still have content — fall back to read_file or read_file_lines).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYesFile ID
Behavior5/5

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

With no annotations provided, the description carries full burden and states 'Read-only; no side effects, auth, or rate limits.' It also discloses the empty-outline meaning and that content may still exist, which is important behavioral context for an agent deciding on next steps. This exceeds what schema or annotations would provide.

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?

Three sentences, each earning its place: what is returned, read-only/usage guidance, and empty-case fallback. The purpose is front-loaded in the first sentence, and there is zero wasted text.

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?

The tool is simple (1 param, no output schema), but the description still covers return format (list of headings with fields), safety profile, usage context, and edge case (empty outline). It fully equips an agent to decide when to call this tool and what the result means.

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 already describes file_id as 'File ID' with 100% coverage, so the baseline is 3. The description's mention of 'one file' aligns with the parameter but adds no new syntactic detail above the schema. Since the single parameter is self-explanatory, the baseline rating 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?

The description begins with a specific verb 'Return' and clearly identifies the resource as 'a flat list of markdown headings for one file' including exact fields (level, text, line, byteStart, byteEnd). It distinguishes itself from sibling tools like read_file (full body), read_section (section reading), and update_file_section (section editing).

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?

Explicitly tells when to use: 'Use as a cheap probe before read_section or update_file_section' and provides a clear fallback: 'fall back to read_file or read_file_lines' when the outline is empty. This gives direct usage guidance and names alternatives.

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/safiyu/kontexta'

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