Skip to main content
Glama

Read a file's contents from OneDrive

read_onedrive_file
Read-only

Open one file and return what is in it. Text, CSV, JSON, HTML and code files come back as themselves; images come back as pictures the assistant can look at (a large photo, or a HEIC or TIFF, is scaled down to a JPEG; images up to 25 MB); a PDF comes back whole as a document (an embedded application/pdf resource) for the assistant to read, up to 10 MB. Word documents (.docx) come back as their text, with headings, lists and tables. Excel workbooks are refused in favour of read_excel_range. Get the id from list_onedrive_items or search_onedrive_items.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mailbox": "<mailbox>",
      "itemId": "<itemId>"
    },
    "name": "read_onedrive_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemIdYes
mailboxYesEmail address of the connected Outlook/Microsoft 365 mailbox to act on. Call list_authorized_mailboxes to see available options.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered; the description goes well beyond that. It discloses transformation behavior (HEIC/TIFF and large photos downscaled to JPEG), hard size ceilings (25 MB images, 10 MB PDFs), and the unusual return channel for PDFs (an embedded application/pdf resource), which an agent could not infer from structured fields.

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

Conciseness4/5

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

It is front-loaded with the core action and then proceeds type by type with no filler sentences. The nested parentheticals around image scaling and size limits are dense but carry real operational information rather than padding.

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?

There is no output schema, so the description carries the full burden of explaining return values, and it does so per file type including the PDF resource case. Combined with the annotation-covered safety profile and two required parameters, an agent has everything needed to call it correctly.

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

Parameters4/5

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

Schema description coverage is only 50%: the mailbox parameter is documented in the schema, but itemId has no description there. The description compensates for itemId by telling the agent to source it from list_onedrive_items or search_onedrive_items, adding provenance the schema lacks. It does not add anything about the mailbox parameter, but that gap is already covered in-schema.

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?

"Open one file and return what is in it" states a specific verb and resource, and the following sentences enumerate exactly what comes back for each file type. It explicitly carves itself away from read_excel_range, so an agent can distinguish it from the workbook-reading sibling without opening either 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?

It names the id-discovery path ("Get the id from list_onedrive_items or search_onedrive_items") and gives an explicit exclusion rule: Excel workbooks are refused in favour of read_excel_range. That is when-to-use, where-to-get-inputs, and when-not-to-use in one compact block.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources