get_outline
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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Relative file path | |
| detail_level | No | Output 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". | |
| nested | No | When 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_nesting | No | Minimum (line_end - line_start) for a top-level symbol to be expanded when nested=true. Default 100. | |
| output_format | No | Output format. "json" (default) returns JSON; "toon" returns Token-Oriented Object Notation — 30-60% fewer tokens, lossless. "markdown" is unsupported here and behaves as json. |