slice
Retrieve a small component or symbol plus exact #Lstart-Lend source code before reading files or grepping, and optionally mark the matched component STALE for internal fixes.
Instructions
Step 1 (Slice + Code in One Shot): Retrieve a <2KB component/symbol slice AND exact #Lstart-Lend source code (set query='<function_or_helper>', include_code=true) BEFORE calling read_file or grep. Pass mark_stale=true when pulling code for an internal fix (no contract change) to mark the matched component STALE in one shot.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "slice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Artifact kind (COMPONENT, FLOW, INTERFACE, LAW, SCHEMA) | |
| board | No | Board name (default: lattice_core) | |
| query | No | Keyword or AST function/class/_helper name query | |
| stage | No | Stage identifier | |
| schema | No | Schema or contract name | |
| division | No | Owner division alias | |
| component | No | Component scope ID | |
| mark_stale | No | Transition matched component(s) to STALE in one shot for internal code fixes (default: false) | |
| include_raw | No | Include full raw records (default: false) | |
| include_code | No | Inline exact #Lstart-Lend source code blocks for matched functions/classes/helpers (default: false) | |
| project_root | No | Optional repository root path (auto-discovered by board name or file paths if omitted) |