spec_nav_read_function
Read full function source, signatures, doc comments, imports, and line numbers by id or file/name; retrieve up to 10 functions, line windows, or paginated long functions.
Instructions
Read functions in full (signature, doc comment, imports used, source with line numbers), up to 10 per call with functions. For code you will not edit; to edit a file, Read it (Edit requires that). Identify by id, or file+name (+line). For a long function or lines outside any function, pass lines to get only ±around lines. Long functions come in parts with a cursor; nothing is cut silently. Answers STALE if the code changed since the id was issued. Does not say whether another service may import it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| file | No | Path relative to the repo root. | |
| line | No | A line inside the function, to disambiguate. | |
| name | No | Qualified ("OrderService.calculateFee"), short, or exported name. | |
| lines | No | Read only ±`around` lines around these file lines. With `file` alone: windows anywhere in the file. | |
| around | No | Lines either side of each of `lines` (default 15, max 60). | |
| cursor | No | nextCursor from the previous part; refuses if the function changed. | |
| format | No | "text" (default, compact) or "json" (structured). | |
| fromLine | No | Continue a long function from this file line. | |
| maxLines | No | Lines per part (default 400). | |
| functions | No | Up to 10 functions, each by `id` or `file`+`name` (+`line`), or only windows with `lines`. Instead of the single-function fields. |