read_smart
Reads files with AST-aware diff caching to reduce token use: first reads add chunk metadata, unchanged re-reads return ~50 tokens, modified re-reads return only changed chunks.
Instructions
Token-saving file reader with AST-aware diff caching. Use INSTEAD of the standard Read tool for ALL file reads — even first reads gain chunk metadata for future savings.
• First read: full content + chunk metadata (enables future savings) • Re-read unchanged: ~50 tokens (99% savings) • Re-read modified: only changed chunks (50-90% savings)
Especially effective for files >200 lines. Always prefer this over Read.
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": "read_smart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute file path | |
| force | No | Return full content regardless of cache |