Read a text file from OneDrive
files_read_textReads text-based OneDrive files (Markdown, CSV, JSON, code) and returns their content as a string, truncating long files. Rejects binary formats like PDFs and Office docs with a clear explanation.
Instructions
Returns the contents of a text-like OneDrive file (plain text, Markdown, CSV, JSON, XML, source code, config) as a string, truncated to maxChars, which defaults to 20000. Reads the file metadata first and refuses binary formats — PDFs, images, Office documents, archives, media — with an explanation, because their bytes are not readable as text. Word, Excel and PowerPoint files are zip containers and cannot be read here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | Id of the file to read, as returned by files_list_children or files_search. | |
| maxChars | No | Maximum characters of file content to return. Defaults to 20000; longer files are truncated with a marker. |