Skip to main content
Glama

call_hierarchy

Analyze code flow by displaying functions that call a symbol and those it calls, based on file path, line, and column.

Instructions

Show call hierarchy for a symbol at a position. Returns callers (incoming), callees (outgoing), or both depending on the direction parameter. Direction defaults to "both". Use this to understand code flow -- which functions call this function and which functions it calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYes
columnYes
directionNo
file_pathYes
language_idNo
Behavior3/5

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

No annotations are provided, so the description bears full responsibility. It explains the default direction and return types (callers/callees) but does not disclose read-only nature, required LSP state, or behavior on missing positions. The description is adequate but lacks some common behavioral details.

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 long, with the core functionality in the first sentence and usage guidance in the second. No extraneous information, perfectly concise and well-structured.

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?

With 5 parameters, no output schema, and no annotations, the description should be more comprehensive. It lacks details on how to specify position (line/column format), file path conventions, and the structure of the returned hierarchy. Significant gaps remain for a code navigation tool.

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 coverage is 0%, meaning no parameter descriptions in the schema. The description explains the 'direction' parameter and its default, but fails to describe 'file_path', 'line', 'column', and 'language_id'. With 5 parameters, this is insufficient compensation.

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 it shows call hierarchy for a symbol, distinguishing callers and callees. However, it does not explicitly differentiate from sibling tools like 'type_hierarchy' or 'get_references', though the name 'call_hierarchy' provides some distinction.

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?

The description explicitly says 'Use this to understand code flow', providing clear context. It does not mention when not to use it or alternatives, but the instruction is sufficient for basic guidance.

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/blackwell-systems/agent-lsp'

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