Read File
readRead text file contents with head, tail, or specific line ranges. Preview large files using head. Optionally include SHA-256 hash of the full content.
Instructions
Read text file contents. Use head to preview first N lines of large files. For multiple files, use read_many.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to file or directory. | |
| head | No | Read first N lines (preview) | |
| tail | No | Read last N lines | |
| startLine | No | Start line (1-based, inclusive). Defaults to 1 when endLine is set. | |
| endLine | No | End line (1-based, inclusive). Defaults to last line when startLine is set. | |
| includeHash | No | Include SHA-256 hash of full file content |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | Content | |
| truncated | No | Truncated? | |
| resourceUri | No | Full content URI | |
| totalLines | No | Total lines | |
| head | No | Head lines | |
| tail | No | Tail lines | |
| startLine | No | Start line | |
| endLine | No | End line | |
| linesRead | No | Lines read | |
| hasMoreLines | No | More lines? | |
| ok | Yes | ||
| path | No | ||
| contentHash | No | SHA-256 of full file content |