local_explain_code
Explains code files or snippets in prose for explanation only using a local model, reading files server-side to keep large content out of context and save quota.
Instructions
PREFER this tool over reading the file with Read when the file is large (>200 lines / >10 KB) and you only need an explanation, not the literal content.
Explains in prose what a code snippet/file does, with a local code model.
Pass 'path' to read the file server-side (the full code does NOT enter Claude's context; only
the explanation comes back) or 'code'. Optionally focus the explanation with 'question'.
With 'path' the model sees the file's line numbers, so it can answer where something is
("name: line") and you can then Read only that range with offset/limit. With 'path' and a
'question', the server then checks those numbers against the file: cited lines that do not
contain what they are cited for get a warning, and each code identifier of the question
(`name`, name(), camelCase, snake_case) gets its exact lines, found by whole-word search.
Review the explanation: a local model writes it; the occurrence lines are exact.
Args:
code: Code to explain (use this or 'path').
path: Path to a code file (read server-side).
question: Concrete question or focus (optional).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "local_explain_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| path | No | ||
| question | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |