compile_context
Pass changed symbol IDs or a git ref to compile a token-bounded view of callers, callees, and related functions. Include a bug report or issue text to focus on symbols relevant to the problem.
Instructions
Compile LLM-ready context for a change.
Give it changed symbol IDs (e.g. ./src/auth.py:validate_jwt) or a git ref (e.g. HEAD~1), and it returns the callers, callees, and related functions the model needs to make the change safely — packed into max_tokens with a disclosure header showing what was dropped.
Optionally pass task_description (the bug report or issue text) to bias retrieval toward symbols relevant to the described problem — the one signal the graph alone can't provide.
Args: repo_path: Absolute path to the repository. If omitted, uses the --repo from server startup. changed_symbols: List of changed symbol IDs (e.g. ["./src/auth.py:validate_jwt"]). Mutually exclusive with git_ref. git_ref: Git ref to detect changes from (e.g. "HEAD~1"). Mutually exclusive with changed_symbols. When only task_description is given (no changed_symbols or git_ref), defaults to "HEAD". task_description: The bug report or issue text. Biases retrieval toward symbols semantically related to the described problem, not just structurally near the changed symbols. max_tokens: Token budget for the context (default 8000). meta: Disclosure header level: "full" (default), "compact", or "off". The pass@1 effect of meta level is UNMEASURED.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | No | full | |
| git_ref | No | ||
| repo_path | No | ||
| max_tokens | No | ||
| changed_symbols | No | ||
| task_description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |