Skip to main content
Glama
N0moreher0
by N0moreher0

File symbols

project_file_symbols
Read-only

Extract all symbols (functions, classes, structs, interfaces) from a single source file with an optional language hint to get a complete file-level symbol list.

Instructions

Extract all symbols (fn/def/class/struct/interface) from one source file, with an optional language hint. Use when: you need the complete symbol list of a single file (not just the top-level outline). Avoid when: you need cross-file references (project_symbol_references) or a directory tree (project_list_files). Speed: fast; single-file regex scan, no external indexer. Output: file_symbols: count, language, symbols[] {name, kind, line, signature}. Batch-safe: yes

Input Schema

NameRequiredDescriptionDefault
languageNo
relative_pathYesPath inside the workspace (relative, or absolute inside the workspace)
include_classesNo
include_functionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.4

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, it discloses the implementation model (single-file regex scan, no external indexer), the performance profile (fast), and batch-safety. It also describes the return payload shape even though no output schema exists, which is exactly the extra context annotations cannot supply.

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?

Front-loaded with purpose on the first line, then labeled Use/Avoid/Speed/Output/Batch lines that each carry distinct information. The fragment style is dense and skimmable, though the mismatch between 'all symbols' and the undocumented include_* toggles is compounded by the compressed format.

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 no output schema, the description correctly compensates by summarizing the returned structure (count, language, symbols[] with name/kind/line/signature) and by bounding the scope to a single file. Only the two include_* filters remain unexplained for a 4-parameter tool.

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 only 25%, with just relative_path documented, but the description explains the optional language hint and frames the result set as 'all symbols', which implies the include_classes/include_functions toggles default to on. The two include_* booleans are never named or explained, leaving a real gap given the low coverage.

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?

States a specific verb (Extract) plus a precisely scoped resource (all symbols fn/def/class/struct/interface from one source file). It explicitly separates itself from project_outline_symbol by excluding the 'top-level outline' case, so an agent can pick it without opening a schema.

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?

Contains explicit 'Use when' and 'Avoid when' clauses that name the two competing siblings (project_symbol_references for cross-file references, project_list_files for directory trees). The routing decision is fully specified rather than inferred.

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