Skip to main content
Glama
kvnpetit

SRC (Structured Repo Context)

by kvnpetit

list_symbols

list_symbols
Read-onlyIdempotent

Extract code symbols like functions, classes, and variables from a file, returning structured details for each symbol's name, type, location, and signature.

Instructions

Extract all code symbols (functions, classes, variables, etc.) from a file. Returns structured information including name, type, location, and signature for each symbol.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typesNoFilter by symbol types: function, class, variable, constant, interface, type, enum, method, property
contentNoCode content to analyze directly (either file_path or content required)
languageNoLanguage name (auto-detected from file path if not provided)
file_pathNoPath to the file to analyze (either file_path or content required)
max_symbolsNoMaximum symbols returned (default: 1000)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
metaYes
errorNo
messageNo
successYes
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds that the result is structured with name, type, location, and signature, but does not mention constraints like max_symbols or the file_path/content requirement. No contradiction with annotations.

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 two sentences with no filler. The action and result are front-loaded, and every sentence adds meaningful information.

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?

Given the rich input schema, output schema, and safety annotations, the description is nearly sufficient for calling this read-only tool correctly. The only notable gap is the lack of explicit routing guidance among the many symbol-related sibling tools.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all five parameters. The description only adds generic context about symbol kinds and does not provide additional parameter-level semantics beyond the schema, so the baseline 3 is appropriate.

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 clearly states a specific verb ('Extract all code symbols') and a specific resource ('from a file'), and previews the structured output fields. It is not tautological, but it does not explicitly disambiguate itself from sibling tools like find_symbols or parse_ast.

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

Usage Guidelines2/5

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

The description gives no guidance on when to prefer this tool over alternatives such as find_symbols, parse_ast, or query_code. It implies a use case—extracting symbols from a file—but provides no explicit context, prerequisites, or exclusion criteria.

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