Stellarion
Tools

stellarion_get_callers

Find all functions that call a given function, with transitive depth control

Answers the question "who calls this function?" by traversing the call graph upward. Supports transitive callers — not just direct callers, but callers-of-callers up to a configurable depth.

Essential for understanding how widely a function is used before modifying or deprecating it.

When to Use

  • You want to know everywhere a function is called from before refactoring it
  • You need to assess the blast radius of changing a function's signature
  • You want to trace how a low-level utility is reached from high-level entry points
  • You are investigating a bug and need to find all code paths that trigger a function

Parameters

ParameterTypeRequiredDefaultDescription
uristringyesFile path of the function to look up
linenumberyesLine number where the function is defined
depthnumberno3How many levels of transitive callers to follow (1 = direct callers only)

Examples

Find direct callers of a function

Natural language:

Who calls the validateToken function in src/auth/jwt.ts?

MCP call:

{
  "tool": "stellarion_get_callers",
  "arguments": {
    "uri": "src/auth/jwt.ts",
    "line": 42,
    "depth": 1
  }
}

Trace callers up to 3 levels deep

Natural language:

Show me the full call chain leading to dbQuery in src/db/connection.rs

MCP call:

{
  "tool": "stellarion_get_callers",
  "arguments": {
    "uri": "src/db/connection.rs",
    "line": 87,
    "depth": 3
  }
}

Assess blast radius before a refactor

Natural language:

How many places call formatCurrency in src/utils/format.py?

MCP call:

{
  "tool": "stellarion_get_callers",
  "arguments": {
    "uri": "src/utils/format.py",
    "line": 15
  }
}

Output Format

Returns a tree of caller relationships:

  • name — Caller function name
  • uri — File path of the caller
  • line — Line number of the caller definition
  • callers — Nested array of transitive callers (up to the requested depth)

At depth 1 you get a flat list. At depth 2+ you get a tree showing the full call chain from entry points down to the target.

Tips

  • Start with depth: 1 to get a count of direct callers, then increase depth if you need the full picture.
  • Large depth values on heavily-used utility functions (like log or toString) can return very large trees. Use depth: 1 for these.
  • Pair with stellarion_get_callees to understand both directions of a function's relationships.
  • Use stellarion_symbol_search first if you don't know the exact file and line of the target function.