OneDrive Read File
onedrive_read_fileReads a text file from your OneDrive synced folder. Supports .txt, .md, .csv, .json, .xml, .log and several code file types. Auto-detects UTF-8, falls back to Latin-1/Windows-1252 for legacy files (common in Latin American banking .TXT padrones). For files elsewhere on this Mac, use file_read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file | |
| offset | No | Start reading at byte offset (default 0) | |
| encoding | No | Force a specific encoding: 'auto' (default), 'utf8', 'latin1', 'cp1252', 'ascii', 'utf16' | |
| max_bytes | No | Maximum bytes to read (default 1048576 = 1 MB, capped at 10485760 = 10 MB) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 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 | ascii | utf16) | |
| truncated | No | True if more content remains beyond what was returned | |
| bytes_read | No | Number of bytes read in this slice |