Skip to main content
Glama
beruang
by beruang

lsp_prepare_call_hierarchy

Generates call hierarchy for a symbol at a specified file position, returning cached IDs for incoming and outgoing call analysis.

Instructions

Prepare call hierarchy items for a symbol. Returns cached opaque IDs used by lsp_incoming_calls and lsp_outgoing_calls. Maps to textDocument/prepareCallHierarchy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute or workspace-relative path to the file.
maxItemsNoMaximum number of hierarchy items.
positionYesLine/character position (zero-based) of the symbol.
Behavior3/5

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

With no annotations, description briefly mentions caching and opaque IDs but lacks detail on side effects, permissions, error handling, or idempotency. Adequate but not thorough.

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?

Three concise, front-loaded sentences: purpose, return usage, LSP mapping. No superfluous text.

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?

Sufficient for 3-param read-like tool with no output schema; explains relationship to siblings. Could note error scenarios, but overall complete.

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 coverage is 100%, baseline 3. Description adds no additional meaning to parameters beyond schema definitions; no extra behavioral or format hints.

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?

Specifically states it prepares call hierarchy items for a symbol, distinctly from sibling tools that use its output (lsp_incoming_calls, lsp_outgoing_calls). Maps to standard LSP method for clear identification.

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

Usage Guidelines4/5

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

Implicitly establishes usage sequence by stating it returns IDs used by sibling tools, guiding when to call it. Could further clarify prerequisites (e.g., document must be open).

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

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