read
Read files or directories from the local filesystem using absolute paths. Retrieve specific line ranges with offset and limit, and view images or PDFs as attachments.
Instructions
Read a file or directory from the local filesystem. The filePath should be absolute. By default, returns up to 2000 lines starting at line 1. Use offset (1-indexed) and limit to read later sections. Lines are returned as : ; directories list entries with a trailing / for subdirectories. Lines longer than 2000 characters are truncated. Images and PDFs are returned as attachments.
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": {
"filePath": "<filePath>"
},
"name": "read"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | The maximum number of lines to read (defaults to 2000) | |
| offset | No | The line number to start reading from (1-indexed) | |
| filePath | Yes | The absolute path to the file or directory to read |