read_file
Read the contents of a text file within size limits, with options to specify line range or byte count. Binary files are automatically rejected.
Instructions
Read the text contents of a file. Only works for text files within the size limit. Binary files (images, videos, executables, etc.) will be rejected.
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 | Relative path to the file. | |
| maxBytes | No | Maximum bytes to read (default: server limit). | |
| startLine | No | If provided, returns only lines starting from this 1-based line number. | |
| endLine | No | If provided, returns only lines up to and including this 1-based line number. |