smart_read_file
Reads source files as AST skeletons, keeping the target function or class body and 1-hop dependency signatures while folding inert code to reduce token usage. Use symbol for schema files.
Instructions
AST-skeleton file reader: keeps the target function/class body + 1-line 1-hop dependency signatures, folds inert code (-90-99% tokens). Relative or absolute paths. Schema files (OpenAPI/Prisma/GraphQL/SQL) auto-slice via 'symbol'. For 3+ related symbols use smart_bundle instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "smart_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path (relative to workspace or absolute) | |
| symbol | No | Optional: function/method/class/component or schema model/type/table to extract (omit for whole-file skeleton) | |
| dep_mode | No | 'signature' (default) = 1-line dep signatures; 'full' = inline dependency bodies | |
| end_line | No | Optional: ending line number | |
| force_full | No | Bypass pointer dedup — use only after context compaction or as a fresh subagent | |
| start_line | No | Optional: starting line number | |
| include_deps | No | Include 1-hop dependency signatures (default true) |