Skip to main content
Glama

call_hierarchy

Analyze code flow by identifying which functions call a specific function and which functions it calls. Use this tool to understand call relationships and dependencies within your codebase.

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
file_pathYes
language_idNo
lineYes
columnYes
directionNo
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the tool's behavior (returns callers, callees, or both based on direction, with a default) and its purpose in code flow analysis. However, it lacks details on permissions, rate limits, error conditions, or response format, which are important for a tool with 5 parameters and no output schema.

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 appropriately sized and front-loaded, with the first sentence stating the core purpose and the second providing usage context. Every sentence adds value without redundancy, making it efficient and well-structured for quick understanding.

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 complexity (5 parameters, no annotations, no output schema), the description is incomplete. It covers the tool's purpose and basic behavior but lacks details on parameter meanings beyond 'direction', error handling, or return format. This leaves gaps for an AI agent to invoke it correctly without additional context.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It explains the 'direction' parameter's purpose and default value, adding meaning beyond the schema. However, it does not clarify the semantics of other parameters like 'file_path', 'language_id', 'line', and 'column', leaving them undocumented in both schema and description.

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?

The description clearly states the tool's purpose with specific verbs ('Show call hierarchy') and resources ('for a symbol at a position'), and distinguishes it from siblings by focusing on code flow analysis rather than navigation, editing, or diagnostics. It explicitly mentions what the tool returns (callers, callees, or both).

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 provides clear context for when to use the tool ('to understand code flow'), explaining its purpose in analyzing function relationships. However, it does not explicitly state when not to use it or name specific alternatives among the many sibling tools (e.g., get_references or go_to_definition for similar but different purposes).

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