Read file
files_read_fileRead text files with optional line or character windows to avoid loading huge content. Returns total line count and errors on binary files, enabling efficient summarization pipelines.
Instructions
Reads a text file, optionally windowed by line range (start_line, max_lines) and/or capped by max_chars. total_lines tells you how big the file is, so you know whether/how to window a large one. Errors clearly on non-text files instead of returning garbage. Pair with for_each + build_prompts + ask_llm to summarize many files with a cheap local model instead of spending the calling agent's own context on the raw text.
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": "files_read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| max_chars | No | ||
| max_lines | No | ||
| start_line | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||