Skip to main content
Glama

getCallHierarchy

Read-only

Retrieve the call hierarchy for a function or method to find callers, callees, or both, using file location and direction parameters.

Instructions

Get the call hierarchy for a function or method. Use direction="incoming" to find callers, "outgoing" to see everything it calls, or "both" (default).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesWorkspace or absolute path
lineYesLine number (1-based)
columnYesColumn (1-based)
directionNo"incoming"=callers, "outgoing"=callees, "both"=all (default)
maxResultsNoMax callers/callees per direction (default: 50, max: 200)
cursorNoCursor from previous call's nextCursor. Omit on first call.
Behavior3/5

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

Annotations already declare readOnlyHint=true; description does not contradict and adds the direction behavior. No additional disclosure (e.g., performance, auth) beyond 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?

Two sentences, front-loaded with purpose, no redundancy. Every sentence serves a clear role.

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?

No output schema, yet description omits return value explanation. Also does not mention cursor usage despite it being a key parameter. Incomplete for a 6-param tool.

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%, so baseline is 3. Description adds minimal value by explaining the direction enum, but other parameters are already well-described in the schema.

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 tool gets the call hierarchy for a function/method, with specific verb and resource. However, it does not differentiate from sibling tools like getTypeHierarchy or findReferences.

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

Usage Guidelines3/5

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

Provides guidance on using the direction parameter for incoming/outgoing/both, but lacks explicit when-not-to-use or alternative recommendations.

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/Oolab-labs/patchwork-os'

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