read_file
Reads a file from a given path and returns its contents as text, with optional offset and limit to retrieve specific line ranges.
Instructions
Read the contents of a file at the given path and return it as text. Supports reading specific line ranges.
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": {
"file_path": "<file_path>"
},
"name": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Optional maximum number of lines to read. Use with offset for paginated reading. | |
| offset | No | Optional 1-based line number to start reading from. Use with limit for paginated reading. | |
| file_path | Yes | The absolute or relative path to the file to read. Accepts cross-drive paths like D:/path/to/file. |