Expand a search hit into surrounding context
get_contextRetrieve contiguous chunks around a semantic search hit by chunk ID or document ID and ordinal to read full functions or sections instead of isolated fragments.
Instructions
Return contiguous chunks around a search hit (by chunk_id or document_id + ordinal) so you can read a whole function/section instead of an isolated fragment. Use after search when a result looks cut off.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Chunks to include after. Default 1. | |
| before | No | Chunks to include before. Default 1. | |
| ordinal | No | Chunk ordinal from a search result. | |
| chunk_id | No | Chunk id from a search result. | |
| maxChars | No | Total character budget for returned text. Default 12000. | |
| document_id | No | Document id from a search result. |