Tools
extract
Read a selected view from registered Context Engine handles.
Use extract after another Context Engine tool returns handles and its API or context is insufficient.
Use when
- You need implementation, documentation, imports, or a complete selected item.
- You want resolved inline type annotations for a handle.
Do not use when
- You need an exact physical line range; use
smart_read. - You have only a file path or symbol name and no handle.
Request
{"handles":["0004r00o"],"view":"code","output_mode":"type_annotated"}Parameters
| Field | Required | Default / bounds |
|---|---|---|
handles | no | []; handles come from Context Engine results. |
view | no | full; union: full, code, docs, module-docs, imports. |
output_mode | no | type_annotated; union: type_annotated, plain_text, both. |
What it returns
The selected source view for each handle. code reads declarations and implementations; docs reads documentation; full combines the complete item or file; imports reads imports/directives; module-docs reads module-level documentation. Type-annotated output falls back to plain text with a note when LSP inlay hints are unavailable.
Common mistakes
- Guessing handles instead of copying registered handles from a result.
- Asking for
fullwhencodeordocsis sufficient and costly output is unnecessary. - Reusing a handle after a rename, move, parent-chain, or signature change; obtain a fresh handle.
Related tools
grep_definition, outline, jump, line_context