read_body
Retrieve the exact source code of any function or method by name or node ID, with file, line numbers, and byte offsets, plus a truncated flag when content exceeds the limit.
Instructions
Read a function/method's real source (L3) — the 'open this and read it' move, so an agent never falls back to cat. Accepts a name or a node_id; returns the exact source span from byte offsets plus {node_id, name, file, start_line, end_line}, capped at max_chars (default 4000) with a truncated flag. If the file/offsets are unavailable it reconstructs a best-effort body from the function's L3 body nodes in line order.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| format | No | text (compact, default) | json (structured result page) | |
| node_id | No | ||
| max_chars | No |