Skip to main content
Glama

outline

List every symbol and its line range in a source file without reading the full source, using a cached tree-sitter parse to show the file's structure.

Instructions

List every symbol (kind + line range) in a single source file via cached tree-sitter parse. Prefer over Read when you only need the file's structure (what's in here?) rather than the full byte stream — outline returns ~50 lines of structured records vs reading thousands of lines of source.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoDEPRECATED — use `path`. Pre-v1.7 alias, still accepted; emits a deprecated_args notice in _meta.
pathYesFilesystem path to the source file — canonical key (v1.7+). Absolute or relative to project_root.
project_rootNoAbsolute path to the project root (defaults to the MCP working directory)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.27.3

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does disclose useful behavior: results come from a cached tree-sitter parse and return roughly 50 structured records versus thousands of source lines. It does not mention language support limits or what happens on unparseable/binary files, leaving a small 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, front-loaded with the core purpose before the comparison clause. The size/format payoff ('~50 lines vs thousands') justifies its length and nothing is wasted.

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?

No output schema and no annotations, but the description compensates by naming the returned fields (kind + line range) and approximate volume, which is enough for an agent to use the result. It stops short of covering supported languages or failure modes.

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 `path`, `file` (deprecated alias), and `project_root`. The description adds no parameter-level detail beyond the schema, which is the baseline 3 case when structured fields do the heavy lifting.

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 ('List every symbol ... in a single source file') plus the return shape ('kind + line range') and the mechanism ('cached tree-sitter parse'). It explicitly distinguishes itself from the sibling-like Read tool, so an agent can route without opening 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 Guidelines5/5

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

Gives an explicit when-to-use rule ('Prefer over Read when you only need the file's structure') and contrasts it with the full byte stream alternative. The routing condition is concrete rather than implied.

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