Skip to main content
Glama

document_symbols

Retrieve a file's symbol outline—classes, methods, functions, and properties—to understand code architecture without reading all lines.

Instructions

Retrieve outline of classes, methods, functions, and properties in a file. Use to quickly understand file architecture without reading all lines. Struct fields and enum members are collapsed into 'fields_count' by default unless include_fields=True.

Input Schema

NameRequiredDescriptionDefault
queryNo
file_pathYes
max_depthNo
include_fieldsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description has to carry the full burden. It usefully discloses one non-obvious output behavior (struct fields and enum members collapsed into 'fields_count' unless include_fields=True), but says nothing about error conditions, LSP dependency, or what query and max_depth do.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the core action, followed by the usage rationale and then the one caveat that changes output shape. Nothing is redundant, though the caveat could sit closer to the parameter it governs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be spelled out, and the fields-collapsing note covers the main return-value surprise. However, for a 4-parameter tool with zero schema coverage, the undefined query and max_depth leave real gaps an agent must guess at.

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

Parameters2/5

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

Schema description coverage is 0% across 4 parameters, and the description only explains include_fields. The purpose of 'query' and the effect of 'max_depth' are undocumented in both the schema and the description, leaving half the parameters opaque.

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?

States a specific verb and resource ('Retrieve outline of classes, methods, functions, and properties in a file') and the scoping to a single file implicitly distinguishes it from the sibling workspace_symbols. It stops short of naming that sibling, so the differentiation is left to inference.

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?

'Use to quickly understand file architecture without reading all lines' gives a use context, but it frames the benefit rather than conditions. There is no guidance on when to reach for workspace_symbols instead, or on prerequisites such as an active LSP server.

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