compile_repo_context
Compiles a token-budgeted context pack from a local repository by ranking files with BM25 against a task query and mixing verbatim target code with line-indexed skeletons.
Instructions
Walk a local repository on disk (skipping node_modules, .git, lockfiles, binaries, and .env secrets), rank files against taskQuery via BM25, and compile a strict token-budgeted context pack mixing verbatim target code and line-indexed skeletons.
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": {
"rootPath": "<rootPath>",
"taskQuery": "<taskQuery>"
},
"name": "compile_repo_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fullTopK | No | Top code files to keep verbatim (default: 2). | |
| maxFiles | No | Max source files to scan (default: 200). | |
| rootPath | Yes | Absolute or relative directory path of the repository to pack. | |
| taskQuery | Yes | Bug description, feature goal, or symbol names. | |
| tokenBudget | No | Strict max token budget (default: 8000). |