Skip to main content
Glama

get_call_graph

Trace execution flow by retrieving the call graph of any function, showing both callees and callers recursively to any depth.

Instructions

Get the call graph for a function: what it calls and what calls it, recursively up to the specified depth.

Supports 'ClassName.method_name' syntax (e.g., 'SkillManager.initialize'). If multiple functions share the same name, returns a disambiguation list.

Use this to trace execution flow and understand how a function fits into the larger call chain. By default, Python builtins and common stdlib methods (len, append, strip, etc.) are filtered out for clarity. Set include_builtins=True to see everything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
function_nameYes
depthNo
include_builtinsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Discloses key behaviors: recursion up to specified depth, builtin filtering by default, disambiguation for duplicate names. No annotations provided, so description carries full burden.

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?

Front-loaded with purpose, then concise details. Every sentence adds value with no redundancy.

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?

Covers core purpose, edge cases (disambiguation), filtering behavior, and depth meaning. Output schema exists, so return format not needed. Complete for the task.

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?

With 0% schema coverage, description adds meaning for all parameters: function_name syntax and disambiguation, depth as recursion limit, include_builtins toggling filtering.

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?

Clearly states the tool retrieves a recursive call graph for a function, distinguishing it from sibling tools like find_related_code or get_dependency_graph. Mentions specific syntax and disambiguation.

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?

Explicitly says 'Use this to trace execution flow...' providing clear use case. Implicitly contrasts with alternatives, but doesn't explicitly state when not to use.

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/bilal07karadeniz/Grafyx'

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