Skip to main content
Glama

get_call_graph

Map transitive callers and callees for a method symbol up to a configurable depth, with cycle detection and node limit.

Instructions

Transitive caller and/or callee graph for a method symbol, depth-bounded with cycle detection. Output is an adjacency-list dict per direction (callees and/or callers), where each visited symbol maps to its outgoing edges. Direction: 'callees' (what this method transitively calls), 'callers' (who reaches this method), or 'both'. External (BCL/NuGet) callees appear as terminal leaves with isExternal=true. Declared signature only on callee side — no virtual dispatch resolution; agent uses find_implementations separately if needed. Callers side resolves dispatch naturally via Roslyn SymbolFinder. Hard cap on total visited nodes (default 500) — sets truncated=true if hit; edges to truncated targets are still recorded against the source node. Use this instead of recursive find_callers / analyze_method calls when you need depth > 1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesMethod symbol (e.g. 'Greeter.Greet' or 'MyNamespace.MyClass.MyMethod')
maxDepthNoMax traversal depth from root. Default 3.
maxNodesNoHard cap on total visited nodes. Default 500.
directionNo'callees' (default), 'callers', or 'both'.callees
Behavior5/5

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

No annotations, so description carries full burden. Covers cycle detection, hard cap with truncation, direction options, external callee marking, and virtual dispatch limitations. Thorough and accurate.

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?

Well-structured and front-loaded, but slightly verbose. Every sentence adds value; minimal redundancy. Could be tightened but still effective.

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?

Comprehensive for complexity: covers depth, direction, cycle detection, truncation, output format, and external callees. No output schema, but description adequately explains return structure.

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%, baseline 3. Description adds value beyond schema by explaining the graph structure, truncation handling, and external callee details, enhancing semantic understanding.

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?

Clear verb (get) and resource (call graph) with specifics: transitive caller/callee graph for a method symbol, depth-bounded. Distinguishes from siblings like find_callers by mentioning depth > 1.

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?

Explicitly says 'Use this instead of recursive find_callers / analyze_method calls when you need depth > 1', providing clear when-to-use and alternatives.

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/MarcelRoozekrans/roslyn-codelens-mcp'

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