pack_task_context
Pack the code most relevant to a task into a token-bounded XML snippet. Describe the task in natural language and receive ranked, budget-limited source context.
Instructions
Pack the code most relevant to a task into a token-bounded XML snippet.
Ranks every symbol against query (BM25), takes the best match as the root, then
breadth-first expands through its callees and callers, skipping (never truncating)
any symbol that no longer fits.
Args: query: Natural-language description of the task, e.g. "validate user login". budget: Max tokens (cl100k_base) of packed source. The XML markup around the source (file/symbol tags, usage summary) is not counted, so allow ~10% headroom. signatures_only: Pack everything except the root symbol as signature + docstring. path: Repository root to search (default: the server's working directory).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | . | |
| query | Yes | ||
| budget | No | ||
| signatures_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |