Skip to main content
Glama

get_outline

Read-onlyIdempotent

Retrieve all symbols and signatures from a file without bodies. Understand file structure before editing with reduced token usage. Supports nesting for inner declarations.

Instructions

Get all symbols for a file (signatures only, no bodies). Use instead of Read to understand a file before editing — much cheaper in tokens. For reading one symbol's source, follow up with get_symbol. Pass nested: true to expand large top-level symbols (default ≥100 LOC) into their inner function-like declarations — each child carries parentId + depth (max depth 3). Read-only. Returns JSON: { path, language, symbols: [{ symbolId, name, kind, signature, lineStart, lineEnd, parentId?, depth? }] }. Set output_format: "toon" for lossless TOON encoding — cheaper LLM tokens on tabular payloads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative file path
detail_levelNoOutput verbosity. "minimal" returns ~40-60% fewer tokens (drops scores, fqn, signatures, summaries — keeps name/file/line). Use when you only need to pick a candidate before drilling in with get_symbol. Default: "default".
nestedNoWhen true, walks the body of each top-level symbol whose LOC exceeds min_loc_for_nesting and emits inner function-like declarations as additional rows carrying `parentId` + `depth`. Default false — fully backward compatible.
min_loc_for_nestingNoMinimum (line_end - line_start) for a top-level symbol to be expanded when nested=true. Default 100.
output_formatNoOutput format. "json" (default) returns JSON; "toon" returns Token-Oriented Object Notation — 30-60% fewer tokens, lossless. "markdown" is unsupported here and behaves as json.
Behavior5/5

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

Description discloses read-only nature, token savings, nested expansion with parentId/depth, output format options, and unsupported markdown behavior. Annotations already state readOnlyHint=true, consistent.

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?

Four sentences, well-organized, front-loaded with purpose. No wasted words. Each sentence provides essential information.

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?

No output schema, but description details return structure (path, language, symbols array with fields). Covers edge cases like nested depth and unsupported formats. Completely adequate for a 5-param tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds meaning for all parameters: nested default, min_loc_for_nesting range, output_format token savings, and markdown fallback. Adds significant value beyond schema.

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?

Clearly states it gets all symbols for a file with signatures only, distinguishing from reading full file and get_symbol. Provides specific verb and resource.

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 recommends using this instead of Read to understand a file before editing, and suggests get_symbol for one symbol. Provides clear context and 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/nikolai-vysotskyi/trace-mcp'

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