Read an indexed document
read_documentReads an indexed document as Markdown from the start, around a search hit, or from a saved offset, enabling you to retrieve surrounding context or continue reading page by page.
Instructions
Read an indexed document as Markdown, from the start, around a search hit, or from an offset.
Use after search, when a hit's passage is not enough and you need the text around it, or to read a whole document page by page: when the result has a next_offset, call again with offset=next_offset. The document must have been indexed; the text comes from the index, so re-run index_documents if the file changed. Read-only.
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": {
"path": "<path>"
},
"name": "read_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Document path exactly as returned by search or list_documents. | |
| chunk | No | Chunk number from a search hit; the text starts a little before it. Omit to start at the beginning. | |
| offset | No | Character offset to start from, e.g. the next_offset of a previous call, to keep reading. | |
| max_chars | No | Maximum characters to return, 500-20000. |