Skip to main content
Glama

Write a OneDrive file

m365_files_upload

Write a text file (up to 4 MB) to a path in a mailbox user's OneDrive. If the file exists it is kept and the new one renamed, unless if_exists is replace (which waits for the owner's approval by default) or fail. $0.001. Costs $0.001 per call; nothing if it fails.

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": {
      "path": "<path>",
      "content": "<content>"
    },
    "name": "m365_files_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
contentYes
mailboxNoOne of the mailboxes the agent may act as; optional when only one is connected.
if_existsNorename

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With annotations present, the description still adds real substance: the 4 MB ceiling, the default keep-and-rename conflict policy, the fact that replace waits on owner approval, and per-call pricing with no charge on failure. This is consistent with idempotentHint=false and destructiveHint=false, and clarifies what actually happens to an existing file. It stops short of saying what a pending approval returns to the caller.

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

Conciseness3/5

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

The core behavior is front-loaded, but the pricing is stated twice in nearly identical words ('$0.001.' then 'Costs $0.001 per call; nothing if it fails'), and 'unless if_exists is replace' is awkwardly worded. Trimming the duplication would tighten it noticeably.

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?

For a 4-parameter write tool with no output schema, the description covers size limits, conflict resolution, approval gating, and cost — the things an agent needs before calling it. What a replace request returns while awaiting approval, and the mailbox selection rule, are left unstated.

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 coverage is only 25%, and the description compensates well by defining the path target, the content type and 4 MB limit, and the meaning of all three if_exists values including the approval side effect of replace. The mailbox parameter is left entirely to the schema, which is the one remaining gap.

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

Purpose4/5

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

States a specific verb and resource — writing a text file to a OneDrive path for a mailbox user — with a size bound. It does not explicitly distinguish itself from the generic files_upload or google_drive_upload siblings, but the M365/OneDrive scoping makes the target obvious.

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

Usage Guidelines3/5

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

Usage is only implied: it is clearly a write operation for OneDrive users, and the if_exists discussion hints at overwrite scenarios. There is no explicit statement of when to prefer this over files_upload, google_drive_upload, or m365_files_read, and no prerequisites are named.

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