Skip to main content
Glama

file_outline

Generate a compact skeleton of any file, showing every function, type, and constant with line ranges, to understand large codebases at a glance.

Instructions

Return a token-cheap skeleton of a file: every function, type, method, class, and constant as its signature line with the body collapsed, nested by containment, with byte-precise 1-based line ranges. Use it to understand a large file's shape in one call without reading it — a 2000-line file becomes a few hundred tokens. Symbols come from the language server when available, falling back to the tree-sitter topology index when the server is cold or does not cover the file (source is annotated). Set include_docs=false to omit leading doc-comment lines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriNoAbsolute path, file:// URI, or workspace-relative path of the file to outline.
include_docsNoPrepend the first line of each symbol's leading doc comment (// /// /** # styles). Default true.
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it delivers: it describes the output format (signature lines, nesting, byte-precise line ranges), the fallback mechanism between language server and tree-sitter, the source annotation behavior, and the effect of include_docs=false. This is a rich, transparent account of what the tool actually does.

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 appropriately sized and front-loaded with the core purpose. Each sentence adds distinct information: what it returns, why to use it, the fallback source behavior, and the include_docs flag. No waste; every sentence earns its place.

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?

For a tool with no output schema and no annotations, the description is remarkably complete: it covers the return shape, use case, fallback behavior, and parameter semantics. The token-cheap rationale and the concrete example of a 2000-line file make it self-sufficient for an agent to decide when and how to invoke it.

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

Parameters4/5

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

The schema already documents both parameters at 100% coverage, so the baseline is 3. The description adds value beyond the schema by clarifying that include_docs controls whether leading doc-comment lines are prepended and that the default is true, which gives the agent meaningful behavioral context for parameter choice.

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 uses a specific verb ('Return') and resource ('a token-cheap skeleton of a file'), then enumerates exactly what is included: functions, types, methods, classes, constants with signature lines and collapsed bodies. It clearly distinguishes itself from siblings like read_file or read_symbol by emphasizing the high-level structural overview rather than content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It explicitly says to use this tool 'to understand a large file's shape in one call without reading it,' which gives a clear when-to-use context. It contrasts with reading the file itself by mentioning a 2000-line file becomes a few hundred tokens, though it does not explicitly name alternatives or state when not to use it.

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/plumbkit/plumb'

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