chunk_document
Split long documents into ordered, overlapping chunks with page hints, enabling processing of texts that exceed a single context read.
Instructions
Split a document's text into ordered, overlapping chunks.
Useful for long documents that do not fit one context read. For PDFs the text keeps its '--- page N ---' markers and each chunk carries a 'page_hint' (the page active at the start of the chunk); for other types 'page_hint' is null.
Args: path: File path inside the allowed root. max_chars: Maximum characters per chunk (default 4000). overlap: Characters repeated between consecutive chunks (default 200, must be smaller than max_chars).
Returns a list of {index, start_char, page_hint, text} in document order.
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": "chunk_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| overlap | No | ||
| max_chars | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |