Read a file
readFetches indexed file text around a passage, heading, or cursor, trims at paragraph or sentence ends, and enables forward/backward continuation with section links for citation.
Instructions
Read an indexed file's text around a passage or section, cut at paragraph or
sentence ends. Continue with next (as at), or go back with prev (as at,
with before). Sections start with a Markdown link line to cite them by.
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": {
"file": "<file>"
},
"name": "read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | Where to start: a passage's `chunk` number ('812'), or a cursor from `next`/`prev` ('812:340'). Default: the file's start. | |
| file | Yes | The file's full path, the `file` from search or browse results. | |
| after | No | Characters to read from the starting point on. | |
| before | No | Characters to read before the starting point. | |
| section | No | Start at this section instead, by heading: '§ 1599', 'Tenor'. Reads to the section's end (at most `after` characters). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Shows the starting point highlighted in the user's browser. | |
| file | Yes | ||
| next | No | Where the text stops: pass as `at` to read on. None at the file's end. | |
| page | No | ||
| prev | No | Where the text starts: pass as `at` with `before` to read further back. None at the file's start. | |
| text | Yes | The text. Each new section starts with a Markdown link line, '[heading](url)': copy it to cite that section. | |
| type | Yes | ||
| chunks | Yes | Chunks in the file. | |
| section | No | Heading path at the starting point. | |
| modified | No |