File Read
file_readReads a plain text file from the local filesystem by its absolute path — the primary, default tool for reading a local text file (use this unless the file is a PDF, Word, Excel, or PowerPoint document, which have their own readers). Reads anywhere on this Mac — home, external disks, cloud drives, /tmp — with one exception: credential and identity locations (keychains, ~/.ssh, ~/.aws, browser logins, another user's home, Time Machine backups) are never read. Supports .txt, .md, .csv, .json, .xml, .log, .yaml, .toml and common code file types; auto-detects UTF-8 with Latin-1/Windows-1252 fallback. For files in OneDrive use onedrive_read_file, in Google Drive gdrive_read_file; for PDFs pdf_read, Word word_read, Excel excel_read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file | |
| offset | No | Start reading at this byte offset (default 0) | |
| max_bytes | No | Maximum bytes to read (default 1 MB, max 10 MB) | |
| force_download | No | If the file is stored in the cloud and evicted from this Mac (dataless), request the download and wait for it instead of failing. Off by default: a download can take minutes and use metered data, so it is the caller's decision. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Resolved absolute path of the file | |
| bytes | Yes | Total file size in bytes | |
| offset | No | Byte offset the read started at | |
| content | Yes | Decoded file text content | |
| encoding | No | Encoding used to decode (utf8 | cp1252 | latin1) | |
| truncated | No | True if more content remains beyond what was returned |