Skip to main content
Glama

Call graph

graph
Read-onlyIdempotent

Trace function callers and callees, including transitive dependencies, to see what breaks before changing shared code. Results include whole-word references and method overrides.

Instructions

Trace the call graph: who calls a function (direction='callers') or what it calls ('callees'). transitive=true covers everything that depends on it; use it before you change, rename or delete a shared function ("what breaks if I change X"). A callers result also has references, the whole-word uses of the name, so no grep is needed. For a method, pass Class.method: the result also lists the overrides in subclasses. Edges are static: calls through callbacks, reflection or dynamic dispatch show only in references.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol_name": "<symbol_name>"
    },
    "name": "graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
directionNo'callers' or 'callees'callers
transitiveNoAll direct and indirect dependents. Only with direction='callers'.
symbol_nameYesFunction or symbol to trace

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.4.6

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent and non-destructive, so the bar is lower, yet the description adds substantial behavioral detail: the analysis is static, so calls through callbacks, reflection or dynamic dispatch appear only in `references`. It also discloses that callers results include whole-word name uses and that method queries list `overrides` in subclasses.

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?

Front-loaded with the core verb and the two directions, then layers on the transitive case, the references caveat and the method convention. Dense but every sentence carries information; the parenthetical asides make it slightly harder to scan than a purely linear structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter graph query with an output schema, this covers the mode choice, the transitive scope, the symbol format for methods, and the static-analysis limitation. An agent has everything needed to call it correctly and to interpret when results will be incomplete.

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 100%, so the baseline is 3, but the description adds real meaning beyond the schema: `transitive` is explained as 'everything that depends on it', and `symbol_name` gets the `Class.method` convention for methods. It does not restate the schema's constraint that transitive applies only with direction='callers'.

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?

States a specific verb and resource ('Trace the call graph') and immediately disambiguates the two operating modes: who calls a function vs. what it calls. An agent can distinguish this from a plain symbol lookup or text search without opening the schema.

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?

Gives a concrete decision rule: use it before you change, rename or delete a shared function, framed as 'what breaks if I change X'. It also rules out an alternative behaviour ('no grep is needed'), though it does not name any sibling tool such as find_symbol or search as the alternative for other cases.

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

Deploy Server

Other Tools