Visualizes function call relationships as a graph, showing who calls a function and what it calls. Traverses multiple levels deep to reveal the full call chain.
For simpler use cases, consider stellarion_get_callers (reverse only) or stellarion_get_callees (forward only) which return flat lists instead of a full graph.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| uri | string | Yes | -- | File URI containing the function (e.g., file:///path/to/file.ts) |
| line | number | Yes | -- | Line number of the function (0-indexed) |
| depth | number | No | 3 | How many levels deep to traverse (1-10) |
| direction | enum | No | both | callers (who calls this), callees (what this calls), or both |
| summary | boolean | No | false | Return a condensed summary for large call graphs |
Natural Language:
"Show me the complete call graph for handleRequest"
MCP Tool Call:
{
"name": "stellarion_get_call_graph",
"arguments": {
"uri": "file:///home/dev/project/src/server/handler.ts",
"line": 42,
"depth": 3,
"direction": "both"
}
}
Returns: A graph with handleRequest at the center, showing 3 levels of callers (route dispatcher, HTTP server, test harness) and 3 levels of callees (validation, business logic, database queries).
Natural Language:
"Who calls calculateTax and where does the call originate?"
MCP Tool Call:
{
"name": "stellarion_get_call_graph",
"arguments": {
"uri": "file:///home/dev/project/src/billing/tax.rs",
"line": 18,
"depth": 5,
"direction": "callers"
}
}
Returns: The caller chain from calculateTax up through processInvoice, createOrder, handleCheckout, to the HTTP route handler.
Natural Language: "What does this function directly call?"
MCP Tool Call:
{
"name": "stellarion_get_call_graph",
"arguments": {
"uri": "file:///home/dev/project/src/auth/login.py",
"line": 10,
"depth": 1,
"direction": "callees"
}
}
Returns: Only the direct callees of the login function: validate_credentials, generate_token, log_login_attempt.
The response is a graph structure containing:
depth: 1 to see immediate relationships, then increase depth if you need to trace further.direction: "callers" with high depth to find entry points that lead to a function. This is useful for debugging ("how does a request reach this code?").direction: "callees" to understand what a function touches. This helps assess the complexity and side effects of a function.summary: true to avoid overwhelming output. The summary shows counts and key paths instead of every node.stellarion_analyze_impact for a higher-level risk assessment that includes cross-project and transitive impacts beyond what the call graph shows.