Skip to main content
Glama

Get compact file outline

ast_get_outline
Read-onlyIdempotent

Returns body-free declaration signatures for a single TypeScript or JavaScript file, providing structural symbol metadata on demand to understand code organization and APIs without reading implementation details.

Instructions

Returns body-free declaration signatures for one TypeScript/JavaScript file. Detailed symbol metadata is opt-in because it duplicates signature text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesProject-relative or absolute source file path.
project_rootYesAbsolute project directory containing tsconfig.json, or the config path.
include_symbolsNoInclude detailed symbol metadata. Omit for the smallest body-free response.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
outlineYes
symbolsNo
Behavior4/5

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

Annotations declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, which already cover the safety profile well. The description adds useful behavioral context: it's body-free by design, and symbol metadata is opt-in to avoid duplicating signature text. This adds value beyond annotations by explaining the trade-off rationale.

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 tight sentences, zero waste. The first sentence states the core purpose, the second explains the opt-in design decision. Every word earns its place, and the response is front-loaded with the primary function.

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?

With an output schema present, the return structure is already documented. Annotations cover safety and idempotency. For a single-file read-only outline tool with good schema/annotation coverage, the description is adequately complete. It might mention error behavior (e.g., unparseable file) but that's a minor gap given the other coverage.

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?

Schema coverage is 100%, so the schema documents all 3 parameters. The description adds meaningful context: the include_symbols parameter's purpose (opt-in detailed metadata) and the relationship to body-free output, which clarifies the default behavior beyond the 'default: false' schema hint. However, it doesn't elaborate much beyond what the schema conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Returns body-free declaration signatures for one TypeScript/JavaScript file' - a specific verb+resource+scope. It clearly differentiates from siblings like ast_get_symbol_source (which returns source) and ast_search_symbols (search). However, it doesn't explicitly name alternatives, and the distinction from ast_get_symbol_source could be sharper.

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

Usage Guidelines3/5

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

The description notes that 'Detailed symbol metadata is opt-in' and file scope is 'one file', giving some implied usage context. It does not explicitly state when to use this vs ast_get_symbol_source or ast_search_symbols, nor mention prerequisites like needing the file to exist or be parseable. Usage context is implied but not explicit.

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/yailPeralta/ast-mcp-server'

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