Skip to main content
Glama

get_call_graph

Read-onlyIdempotent

Build a bidirectional call graph around a symbol to reveal both callers and callees. Use it to trace control flow through a function and identify impacted code paths.

Instructions

Build a bidirectional call graph centered on a symbol (who calls it + what it calls). Use to understand control flow through a function. For flat list of all references use find_usages instead. Read-only. Returns JSON: { root: { symbol_id, name, calls: [...], called_by: [...] } }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fqnYesFully qualified name to center the graph on
depthNoTraversal depth on each side (default 2)
symbol_idYesSymbol ID to center the graph on

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv3.3.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
  2. Added
  3. Removedv1.38.0
  4. Changed2 schema fields changedv1.35.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / required
      Added value: +[
      +  "symbol_id",
      +  "fqn"
      +]
  5. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior, so the description's 'Read-only' is redundant but not harmful. The description adds genuine value by disclosing the bidirectional nature of the graph and the exact JSON return shape, which the annotations and schema do not convey. It does not go further to mention traversal cost or default depth behavior, but the schema already documents depth limits.

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?

Three sentences with no fluff: the first states the core function, the second gives the use case and alternative tool, and the third confirms read-only status and return format. Every sentence carries useful information and the key distinction from find_usages is front-loaded.

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

Completeness4/5

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

The tool has moderate complexity (two required identifiers, one optional depth parameter, no output schema), and the description provides the missing return format while the schema documents depth. The only notable gap is not explaining why both symbol_id and fqn are required or how they interact, which could leave an agent uncertain about how to populate both parameters. Overall, enough is present for confident invocation, but this small ambiguity prevents a perfect score.

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 the baseline is 3. The description does not add parameter-specific meaning beyond what the schema already provides for symbol_id and fqn. It implies the result centers on a symbol, but the relationship between symbol_id and fqn (both required) is not clarified in either the description or the schema, so it neither improves nor worsens the baseline.

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 uses a specific verb ('Build') and resource ('bidirectional call graph centered on a symbol'), and immediately clarifies semantics with the parenthetical 'who calls it + what it calls'. It also distinguishes itself from the sibling find_usages by describing the alternative as a flat list of all references, so an agent can tell them apart without opening schemas.

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

Usage Guidelines5/5

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

It states a clear purpose ('Use to understand control flow through a function') and gives an explicit when-not-to-use instruction with the named alternative ('For flat list of all references use find_usages instead'). This is direct routing guidance that leaves no ambiguity about tool selection.

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

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/nikolai-vysotskyi/trace-mcp'

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