Skip to main content
Glama
Softeria

Microsoft 365 MCP Server

by Softeria

upload-file-content

upload-file-content
Destructive

Upload or overwrite file content in Microsoft 365 by supplying base64-encoded data, drive ID, and item ID.

Instructions

The content stream, if the item represents a file.

šŸ’” TIP: Body is a base64-encoded string of the file bytes; the server decodes it before PUT. Graph accepts up to 250MB here, but the whole string travels as a tool argument and a truncated one decodes to a truncated file with no error, so use create-upload-session rather than emitting a large base64 string. For new files use path format: /items/root:/path/to/file.txt:/content. Overwrites existing files without warning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesBase64-encoded file content. The server decodes it and PUTs the raw bytes to Microsoft Graph.
confirmNoFor destructive operations when the confirm gate is enabled (MS365_MCP_REQUIRE_CONFIRM=true; off by default). Set to true only after the user has explicitly approved this action. When the gate is on, calls without confirm: true return { error: "confirmation_required" } without touching user data.
driveIdYesValue for the 'driveId' path segment. Pass it under the name 'driveId', not as 'id'. Use the 'id' field of the drive object as returned by Microsoft Graph.
driveItemIdYesValue for the 'driveItemId' path segment. Pass it under the name 'driveItemId', not as 'id'. Use the 'id' field of the drive item object as returned by Microsoft Graph.
includeHeadersNoInclude response headers (including ETag) in the response metadata
excludeResponseNoExclude the full response body and only return success or failure indication
Install Server

TDQS

B3.1/5.0
Behavior4/5

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

The description discloses several important behaviors: the server decodes base64 before PUT, truncated base64 decodes to a truncated file with no error, and it overwrites existing files without warning. These go beyond the annotations' destructiveHint and provide critical risk information, though it stops short of covering all side effects.

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

Conciseness2/5

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

The first sentence is a vague fragment that does not convey purpose and could be removed. The tip is informative but the description would benefit from a clear verb-first summary and moving the tip into an optional note. As structured, it is under-specified and poorly front-loaded.

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

Completeness3/5

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

Given the complexity (6 params, destructive operation), the description does a good job warning about overwrites and truncation and pointing to create-upload-session for large files. However, it does not describe the response/return value, prerequisites like authentication, or how the path format interacts with the driveItemId parameter, leaving some gaps.

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?

The input schema has 100% description coverage, so the description adds only marginal value beyond it. It clarifies that 'body' is base64-encoded and mentions an alternative path format for new files, which is useful but not essential given the schema already explains each parameter.

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

Purpose2/5

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

The description opens with the noun phrase 'The content stream, if the item represents a file,' which does not clearly state an action. The tip implies the tool PUTs base64-encoded content to a drive item, but the primary description is vague and never explicitly says what the tool does. It also does not distinguish this tool from siblings in the main description.

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 tip explicitly advises using create-upload-session for large files, providing a clear alternative. It also gives a path format for new files, which is a direct usage instruction. However, it does not explicitly state the conditions for using this tool (e.g., small files, overwriting existing content) beyond implication.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Softeria/ms-365-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server