Skip to main content
Glama

find_all_callers_recursive

Traverse the full call tree to find all transitive callers of a C/C++ function, including indirect calls via function pointers, for impact analysis.

Instructions

Find all transitive C/C++ callers — who calls name, directly or indirectly, through the libclang call graph including function-pointer edges. libclang-powered: follows function-pointer assignments and ISR vector registrations across the full call tree.

Use for impact analysis: "if I change this function, how far does the ripple go?" Returns callers at depth 1 (direct), depth 2 (callers of callers), up to max_depth (default 5). Results are deduplicated — each caller appears once at its shortest distance to the target.

For a flat, single-level caller list use find_callers (faster). For the reverse direction use find_callees_recursive.

Read-only. No side effects. Requires the reference index (fw-context index — refs on by default). BFS from the target outward; performance scales with call-graph fan-out.

Args: name: Symbol name to find transitive callers of. project_root: Project root. Auto-detected if omitted. max_depth: Maximum BFS depth for transitive search (default 5). limit: Maximum results (default 50).

Returns: list of dicts, each with: caller (str — caller name), caller_qualified_name (str), depth (int — distance from target), file (str), line (int), ref_kind ("call" or "indirect").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSymbol name to find transitive callers of.
limitNoMaximum results (default 50).
max_depthNoMaximum BFS depth for transitive search (default 5).
project_rootNoProject root. Auto-detected if omitted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, description fully discloses read-only nature, no side effects, required index, BFS algorithm, and performance characteristics. Also describes result deduplication and distance metric.

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 with lead sentence, usage, differentiation, and parameter summary. Minor redundancy with schema descriptions, but overall efficient and 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?

Given tool complexity and presence of output schema (implicitly described), description covers behavior, parameters, return format, and prerequisites adequately. Minor gap: no explicit mention of error handling or empty results.

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 coverage is 100%, so baseline is 3. Description repeats schema descriptions without adding new semantics, but it does summarize defaults and behavior. No added value beyond schema.

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 clearly states the tool finds transitive C/C++ callers with specific details about using libclang and function-pointer edges. It differentiates from siblings by mentioning alternatives for flat and reverse searches.

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 provides use case ('impact analysis') and when-not-to-use, referring to sibling tools find_callers and find_callees_recursive. This helps the agent choose correctly.

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/turbyho/fw-context-mcp'

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