Summarize symbol for context
get_context_for_symbolSummarize a symbol's signature, effect row, doc comment, callers, and callees into a token-budgeted prompt, omitting sections that don't fit.
Instructions
Summarize one symbol for an LLM prompt within an approximate token budget: signature, effect row, doc comment, callers, and callees, added in that order while they fit. Use it as the default way to bring a symbol into context; use lookup_definition for just the location, explain_effect_row for effect explanations, and render_ir_fragment for the full body. Returns kind, the budget applied, summary (prompt-ready text), approx_tokens (its estimated cost at ~4 characters per token), and omitted (the sections that did not fit). The signature is always present, truncated when the budget is smaller than it. An unknown name is not_found with the available names in error.data.available. Read-only: compiles the file's directory in memory (cached until a sibling changes) and writes or executes nothing. Failures are isError results with a stable error.code: file_not_found, read_error, invalid_params, and, for every tool but check_file, parse_error or check_error carrying coded diagnostics in error.data.diagnostics (the shape check_file returns).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to a .hird source file, absolute or relative to the server's working directory. Every .hird file in its directory is compiled with it as one program, so imported names resolve; answers may name a sibling file. | |
| name | Yes | The symbol's name, as the file's source would write it: a local definition, a member imported with `use Mod.{name}`, or `Qualifier.name` through `use Mod`. | |
| budget | No | Approximate token budget for the summary, at ~4 characters per token; optional, 400 when omitted. A section that does not fit is dropped whole and named in `omitted`; only the signature is truncated. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| kind | Yes | ||
| budget | Yes | ||
| symbol | Yes | ||
| omitted | Yes | ||
| summary | Yes | ||
| approx_tokens | Yes |