Skip to main content
Glama
ProfessioneIT

lsp-mcp-server

lsp_document_symbols

Read-onlyIdempotent

Extract all defined symbols like functions, classes, and variables from a source file to analyze code structure and enable navigation.

Instructions

Get all symbols (functions, classes, variables, etc.) defined in a document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the source file
Behavior3/5

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

Annotations already cover key behavioral traits: readOnlyHint=true (safe read), openWorldHint=false (limited scope), and idempotentHint=true (repeatable). The description adds minimal context by implying it returns all symbols from a single document, but doesn't disclose details like response format, pagination, or error handling. 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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and every part contributes to understanding what the tool does.

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?

Given the tool's moderate complexity (LSP-based symbol retrieval), annotations provide good safety and idempotency info, but there's no output schema. The description is minimal and doesn't explain return values or error cases, leaving gaps for an agent to infer behavior.

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%, with the single parameter 'file_path' well-documented in the schema. The description doesn't add any meaning beyond the schema, such as file format requirements or path validation rules, so it meets the baseline for high schema coverage.

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 the verb 'Get' and resource 'all symbols (functions, classes, variables, etc.) defined in a document', which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'lsp_workspace_symbols' (which likely searches across multiple files), leaving some ambiguity about scope.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'lsp_workspace_symbols' for broader searches or 'lsp_goto_definition' for specific symbol navigation, nor does it specify prerequisites such as requiring 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.

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/ProfessioneIT/lsp-mcp-server'

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