pack_context
Assemble a clean, token-bounded Markdown context pack from hybrid search hits for RAG prompts, grouping file chunks and trimming to a set token budget.
Instructions
Assemble a clean, token-bounded Markdown prompt context pack from search hits. Groups contiguous chunks by file, dedupes, and trims to strict token budgets (e.g. 4000 tokens).
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": {
"query": "<query>"
},
"name": "pack_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | ||
| query | Yes | ||
| rerank | No | ||
| path_glob | No | ||
| max_tokens | No | ||
| include_line_numbers | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||