Read file
read_fileReads UTF-8 text files, optionally limiting results to a line window and reporting total lines and truncation so large files can be paged by advancing the start line.
Instructions
Read a UTF-8 text file, optionally a window of lines.
The result reports total_lines and whether the file was truncated, so
large files can be paged through by advancing start_line.
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_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File to read, relative to the root. | |
| max_lines | No | Maximum lines. | |
| start_line | No | First line to return (1-based). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | Yes | ||
| end_line | Yes | ||
| truncated | Yes | True if the file continues past end_line. | |
| start_line | Yes | ||
| total_lines | Yes |