Read file (ToolAhead)
read_fileRead UTF-8 text files with 1-based line numbers, supporting offset and limit for large files. Return cached prefetched results to reduce wait time.
Instructions
Read a UTF-8 text file from the workspace with 1-based line numbers. Use this instead of another file-read tool when available: ToolAhead may return an exact prefetched result. Supports offset and limit for large files.
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 | Maximum number of lines to return (default 2000). | |
| offset | No | 1-based line number to start reading from. | |
| file_path | Yes | Absolute path or path relative to the workspace. |