Explain Code Symbol
explain_codeSynthesize definitions, caller/callee references, related tests, and architectural notes for a specific code symbol in a namespace (read-only, idempotent; consumes 1 Read API call) and return { results, total_candidates } (up to 20 ranked matches). Pass the identifier via symbol or its equivalent alias target (if both are supplied, symbol takes precedence). Use before editing a known function, class, or module to check its blast radius and invariants; use search_code instead when you only have keywords and need to find symbol names first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"namespace": "<namespace>"
},
"name": "explain_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | Exact function, class, or module name to explain (preferred; equivalent to target). | |
| target | No | Alias for symbol accepted for client compatibility when symbol is omitted. | |
| namespace | Yes | Logical repository or workspace namespace containing indexed code memories. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | Ranked { memory, score } symbol definitions, callers, and architectural rules (max 20). | |
| total_candidates | Yes | Total namespace candidates evaluated. |