Read File
readRetrieve text file contents from the local filesystem, with options to read the first or last lines, specify a line range, or process multiple files in one batch.
Instructions
Read one or more text files and return content. Partial reads: head (first N lines), tail (last N lines), startLine/endLine (line range). Batch mode: pass paths[] instead of path; line params are shared across all files. head, tail, and startLine/endLine are mutually exclusive — use exactly one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| head | No | Return first N lines | |
| path | No | Single file path; mutually exclusive with paths | |
| tail | No | Return last N lines | |
| paths | No | Array of file paths for batch mode (max 1000); mutually exclusive with path | |
| endLine | No | End line (1-indexed) | |
| startLine | No | Start line (1-indexed) | |
| includeHash | No | Include SHA-256 hash of the returned content in the response |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | Per-path results ordered to match the input paths | |
| summary | Yes |