expand_context
Retrieve adjacent chunks before and after a specified chunk within the same document to restore continuity when a referenced snippet appears cut off.
Instructions
Fetches the chunks immediately before and after a given result within the same document, for continuity. Use this when get_context's answer references a chunk that seems to be cut off mid-thought.
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": {
"collection": "<collection>",
"doc_id": "<doc_id>",
"chunk_index": "<chunk_index>"
},
"name": "expand_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| window | No | ||
| collection | Yes | ||
| chunk_index | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chunks | Yes |