explain_symbol
Explain any C/C++ symbol in plain English using libclang analysis, returning its purpose, inputs, outputs, and side effects without reading source code manually.
Instructions
USE INSTEAD OF reading code manually with grep/ctx_read. Explain what a C/C++ symbol does in plain English — libclang-aware analysis.
Read-only. No side effects — uses pre-computed LLM analysis when available
(instant, generated during fw-context index --analyze), falls back to
calling Ollama on-demand. Returns the symbol's purpose, inputs, outputs,
and side effects.
For raw source code use get_source. For symbol metadata without
explanation use lookup_symbol. For body + callers + callees use
get_symbol_context.
Args:
name: Symbol name to explain. E.g. uart_init, ModemMsg::send.
project_root: Project root directory. Auto-detected if omitted.
context_lines: Lines of source context around the symbol definition
(default 40, max 200). Only used when no pre-computed analysis exists.
Returns: dict: {name, kind, file, line, signature, explanation, llm_analysis (if pre-computed)}, plus source/explain_prompt on fallback.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Symbol name to explain. E.g. 'uart_init', 'ModemMsg::send'. | |
| project_root | No | Project root. Auto-detected if omitted. | |
| context_lines | No | Lines of source context around the symbol definition. |