Read File
read_fileReads text files by line range using offset/limit, head, or tail; long files return a continuation offset after about 100,000 characters.
Instructions
Read a text file. Output is capped at about 100,000 characters; when a file is longer the result ends with the offset to continue from. Use offset and limit to read a range of lines, head for the first N lines, or tail for the last N lines (use only one of the three).
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 |
|---|---|---|---|
| head | No | If provided, returns only the first N lines of the file | |
| path | Yes | Absolute path, or relative to the server's working directory. | |
| tail | No | If provided, returns only the last N lines of the file | |
| limit | No | Most lines to return, counting from offset. | |
| offset | No | Line number to start reading from (1-based). |