Skip to main content
Glama

call_graph

Read-only

Follow function or method call relationships in either direction—callees or callers—up to a set depth to map dependencies and assess change impact.

Instructions

Follow the calls of a function or method.

Args: symbol: Function or method name, qualified or bare. direction: "callees" (what it calls) or "callers" (what calls it). depth: Maximum number of hops (default 1).

Input Schema

NameRequiredDescriptionDefault
depthNo
symbolYes
directionNocallees
workspaceNoProject path (default: this project)
max_tokensNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds the meaningful clarification that 'depth' counts hops, which conveys traversal cost, but it says nothing about traffic/token volume on deep traversals, truncation, or what the result looks like for a recursive graph.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose sentence is front-loaded and the Args block is tight, with each parameter line adding real information ('qualified or bare', the callees/callers mapping, hops semantics). Minor redundancy with the schema prevents a 5 but nothing is wasteful.

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?

For a 5-parameter graph traversal with no output schema, the definition covers inputs adequately but says nothing about the shape of the returned call graph or how results are limited/truncated. An agent knows how to call it but not what to expect back, which is a real gap for a traversal tool.

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 coverage is only 20% (just 'workspace'), so the description must carry the load and largely does: it defines 'direction' as callees vs callers and 'depth' as maximum hops with default 1, and clarifies 'symbol' accepts qualified or bare names. It leaves 'max_tokens' (default 2000, max 32000) entirely unexplained, which is the main gap.

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?

States a specific verb and resource: 'Follow the calls of a function or method,' which is a concrete graph-traversal action an agent can distinguish from listing symbols or references. It does not explicitly differentiate itself from close siblings like cross_references, dependencies, or impact_analysis, which would have been valuable.

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?

There is no statement of when to prefer this over cross_references, dependencies, or impact_analysis, all of which sound adjacent. The only implicit guidance comes from the 'direction' parameter values, which hint at use cases but do not tell the agent when this tool is the right choice versus its siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.