Skip to main content
Glama

Read a text file from OneDrive

files_read_text
Read-onlyIdempotent

Read text-like OneDrive files—plain text, Markdown, CSV, JSON, XML, source code, or config—as a string, truncated to maxChars. Binary formats are refused; parse PDFs and Office files instead.

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. For .docx, .xlsx, .pptx and .pdf use files_parse_document, which extracts their text as pages, slides or sheets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYesId of the file to read, as returned by files_list_children or files_search.
maxCharsNoMaximum characters of file content to return. Defaults to 20000; longer files are truncated with a marker.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description still adds real behavioral detail beyond them: metadata is read before the content, binary formats are rejected with an explanation rather than failing opaquely, and content is truncated with a marker. That is exactly the value-add expected when annotations carry the safety signal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each load-bearing: what it returns, the refusal rule, and the alternative for unsupported formats. Return behavior is front-loaded and the routing hint closes the paragraph with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return contract itself and does so ('as a string, truncated to maxChars'), plus the failure mode for binary input and the downstream alternative. An agent has everything needed to call it correctly and to recover from a refusal.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both itemId and maxChars are already documented, including the 20000 default and the truncation marker. The description restates the maxChars default but adds no new syntax, format, or edge-case meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ('Returns the contents of a text-like OneDrive file') and enumerates the exact formats covered (plain text, Markdown, CSV, JSON, XML, source code, config). It also carves out the boundary against files_parse_document, so an agent can distinguish it from siblings without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when-not to use it (binary formats — PDFs, images, Office documents, archives, media — are refused) and names the correct alternative for those cases (files_parse_document for .docx/.xlsx/.pptx/.pdf). Both the routing condition and the destination tool are given, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.