Skip to main content
Glama

lsp_symbols

Retrieves all symbols defined in a file via LSP, read-only. Use it to resolve where functions, classes, and variables are declared before navigating or editing code.

Instructions

Symbols for a file. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose one useful trait — that the operation is read-only — but says nothing about prerequisites (e.g. whether an LSP server must be running), latency, or the shape/size of results for a large file.

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?

Two terse fragments, front-loaded with the resource and no filler. It is not padded, though the brevity borders on under-specification rather than disciplined conciseness.

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

Completeness2/5

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

For a one-parameter tool with no output schema and no annotations, the description should at least say what a "symbol" is in this context (hierarchical document symbols vs flat list) and confirm the path form. Both are missing, leaving an agent to call blindly.

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% for the single required parameter. "For a file" weakly clarifies that path refers to a file rather than a workspace or directory, but leaves open whether it is an absolute path, workspace-relative path, or file URI — the exact ambiguity an agent would hit when calling it.

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

Purpose3/5

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

"Symbols for a file" identifies the resource (symbols) and the scope (a single file), so an agent can roughly place it against lsp_diagnostics or lsp_navigate. But it is a verb-less noun phrase — it never says whether it lists, extracts, or resolves symbols, and does not state what kind of symbols (declarations, outline, document symbols). Purpose is implied rather than stated.

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?

There is no when-to-use guidance, no exclusions, and no reference to any sibling tool such as ast_search or lsp_navigate. "Read-only" is a safety trait, not usage guidance. The agent must infer the entire invocation context.

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