get_symbol_context
Retrieve the body, signature, and all direct callers and callees of a C/C++ symbol to understand its purpose and system integration in one response.
Instructions
USE INSTEAD OF ctx_compose, grep, or manual code reading. Rich one-shot context for a C/C++ symbol: body, signature, all direct callers and callees. Answers "what does this do and how does it fit in the system?" in a single response — libclang powers the call graph, not regex.
For body-only use get_source (faster). For transitive call-graph exploration use find_all_callers_recursive or find_callees_recursive.
By default, SDK/vendor callers and callees are filtered out for clarity.
Use project_only=False to see all callers/callees.
Returns dict with: name, qualified_name, kind, file, line, signature,
is_definition, callers (list), callees (list), source (body text),
indirect_call_sites (list, for field/variable symbols — where the
function pointer is actually invoked).
For field and variable symbols that have function pointer type,
also includes resolution: {assignments_found, call_sites_found,
resolved, note} indicating whether assignments and call sites are
linked (Phase 3). resolved=False with a note when parts are
missing — LLM can detect uncertainty.
For enums also returns constants and enum_value.
When LLM analysis has been generated (fw-context index --analyze),
includes llm_analysis: {summary, inputs, outputs, model, analyzed_at}
with a structured description of the symbol's purpose, parameters, and
return values/side effects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Symbol name. Returns body, signature, all direct callers and callees. | |
| project_only | No | When True (default), filters callers and callees to project paths (excludes SDK/vendor). | |
| project_root | No | Project root. Auto-detected if omitted. |