Skip to main content
Glama

onedrive_read_file

Read file contents from OneDrive, extracting text from documents, PDFs, spreadsheets, and presentations. Specify a file path to retrieve its content for further processing.

Instructions

Read the contents of a file from OneDrive.

Supports:

  • Text files (.txt, .md, .csv, .json, etc.)

  • PDFs (text extracted)

  • Word documents (.docx)

  • Excel spreadsheets (.xlsx) - exported as CSV-like format

  • PowerPoint presentations (.pptx)

Args: file_path: Path to the file (e.g., "Documents/report.pdf" or "Stock Investor Accelerator/notes.txt") max_chars: Maximum characters to return (default: 100000)

Discovery: use onedrive_search, onedrive_list_root, or onedrive_list_folder first to find the exact file_path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
max_charsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of explaining behavior. It does this well by noting that PDFs have text extracted, Excel files are exported in CSV-like format, and max_chars limits the amount returned. It could also mention unsupported file types or error behavior, but it is substantially transparent for a read operation.

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?

The description is well-organized with a short intro, a useful supported-formats list, parameter definitions, and a discovery note. Every section earns its place, and no unnecessary filler is present.

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

Completeness4/5

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

Given the tool's moderate complexity, the description covers the essential workflow: finding the file path first, supported formats, and the main parameters. An output schema exists, so return structure need not be described. It is complete enough for an agent to invoke the tool correctly, though it omits details like auth requirements and error handling.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must fully explain the parameters. It does: file_path is defined with concrete examples, and max_chars is described as the maximum characters to return with its default. This goes beyond the bare schema, which only provides types and a default.

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?

The description opens with a specific verb and resource: 'Read the contents of a file from OneDrive.' It clearly explains what operation is performed and distinguishes this from the sibling list/search/write tools, while also naming the supported file types.

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

Usage Guidelines4/5

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

The description explicitly instructs the agent to use onedrive_search, onedrive_list_root, or onedrive_list_folder first to discover the exact file_path. This gives clear when-to-use context and useful preconditions, though it does not enumerate exclusion cases or compare directly with the gdrive read/download siblings.

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