sage_read_file
Read a file with size-aware compression: returns exact content for small files, or an outline with head and line references for large files to conserve tokens.
Instructions
Read a file with SAGE compression: small files exact, large files as outline + head with line references. Prefer this over cat/type/Get-Content to save context.
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": "sage_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Return exact full content | |
| path | Yes | File path to read | |
| lines | No | Optional exact range START:END, e.g. 120:220 | |
| symbols | No | Return only the symbol outline | |
| max_tokens | No | Token budget for large files |