function_body
Get the exact source of a single function by path and name, avoiding whole-file reads. Returns signature, decorators, and body, with disambiguation for ambiguous names.
Instructions
Verbatim source of ONE function — the focused read. Instead of Reading a whole file to inspect one function, get exactly that function's source (including its signature and decorators). Returns JSON {path, name, parent, kind, signature, line, endLine, async, exported, hasErrors, body}. name matches the bare name or the dotted qualified form from functions/find output (e.g. 'Widget.render'); if the name is ambiguous, the call FAILS listing the candidates with their lines — pass the qualified name or line to pick one, it never guesses. body is real source, capped at 20000 chars (truncated.bodyChars = true length — Read line..endLine for the rest). The body IS the territory for this one function, so you may reason about its internals — but not about its callers/callees, and re-Read before editing (files change). Languages: TS/TSX/JS/JSX/Python.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | Disambiguator: the line number of the wanted definition (from functions/find output), when the same name has several definitions. | |
| name | Yes | Function/method name. Bare ('render') or dotted-qualified ('Widget.render') as reported by functions/find. Default exports are named 'default'. | |
| path | Yes | File path. Relative paths resolve against the server's working directory; absolute paths are allowed only inside it (anything outside is rejected — call info to see the root). Supported: .ts .tsx .mts .cts .js .jsx .mjs .cjs .py |