get_context
Runs hybrid search, reranks, applies MMR diversity, and trims to token budget to return a formatted context block with numbered citations, enabling LLMs to answer directly.
Instructions
The flagship retrieval tool: runs hybrid search, reranks, applies MMR for diversity, trims to a token budget, and returns a formatted context block with numbered citations — ready for the calling LLM to answer from directly. Prefer this over raw search_* tools whenever the goal is to answer a question, not just to inspect search results.
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>",
"query": "<query>"
},
"name": "get_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| filters | No | ||
| collection | Yes | ||
| token_budget | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chunks | Yes | ||
| citations | Yes | ||
| token_count | Yes | ||
| formatted_context | Yes |