get_feature_context
Retrieve ranked source code snippets matching a feature description, controlled by a token budget.
Instructions
Search code by keyword/topic → returns ranked source code snippets within a token budget. Use when you need to READ actual code for a concept or feature. For structured task context with tests and entry points, use get_task_context instead. For symbol metadata without source, use search. Read-only. Returns JSON (default) or Markdown: { items: [{ symbol_id, name, file, source, score }], token_usage } | { content: "...markdown..." }. Set output_format: "toon" for lossless TOON encoding — cheaper LLM tokens on tabular payloads. Hard-capped by memory.recall.timeoutMs (default 5000 ms); on timeout returns { items: [], token_usage, degraded: true } so the agent turn never blocks on slow IO.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Natural language description of the feature to find context for | |
| token_budget | No | Max tokens for assembled context (default 4000) | |
| output_format | No | Output format. "json" (default) returns structured items; "markdown" returns LLM-friendly fenced code blocks (~15-20% token savings, easier for the model to read); "toon" returns Token-Oriented Object Notation — 30-60% fewer tokens, lossless. |