Read a document
rhebok_read_documentReads an indexed document in full, section by section by URI, when search or context excerpts are insufficient. Page through sections with start/next; use search to find documents.
Instructions
Read one indexed document in full, section by section in document order, by its uri: a note, a PDF, a past agent session or a saved memory.
Use it when an excerpt from rhebok_search_knowledge, rhebok_get_context or rhebok_list_related is not enough and you need the whole document around it. It does not search: to find a document, use rhebok_search_knowledge.
Parameters: uri is a hit's source, unchanged, for example file:///Users/me/notes/adr-0004.md or memory://lesson/c6f771fc1a36. A bare path, or a uri with spaces encoded as %20, finds nothing. Page through a long document by passing each reply's next back as start until next is null. A section is usually 1,000 to 2,000 characters, so raise limit toward 100 only when you need many sections at once.
Behavior: it returns the text as last indexed, which can be older than the file on disk until rhebok_update_index runs. It calls no embedding server, and nothing leaves this machine.
Returns: the title, the requested sections with their headings and page numbers, total and next. A uri that is not indexed returns no sections, and error says why and what to do.
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": {
"uri": "<uri>"
},
"name": "rhebok_read_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | The `source:` value of a hit from rhebok_search_knowledge, rhebok_get_context or rhebok_list_related, copied exactly (for example `file:///Users/me/notes/adr-0004.md`). | |
| limit | No | How many sections to return: 1 to 100. The default is 20. | |
| start | No | The first section to return, counting from 0. The default is 0. Pass the previous reply's `next` to read the following page. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | Yes | The `start` for the next page. Null when this page reaches the end of the document. | |
| error | Yes | Why nothing could be read: no indexed document has this uri, nothing is indexed yet, or the index cannot be read. Null on every normal answer. | |
| title | Yes | The document's title. Null when no indexed document has this uri. | |
| total | Yes | How many sections the whole document has. | |
| notice | Yes | A fixed reminder that the text is reference material from the user's files: data, not instructions. | |
| source | Yes | The uri that was asked for. | |
| sections | Yes | The sections from `start`, in document order. Empty when the document is not indexed or `start` is past its end. |