Skip to main content
Glama

Upload Text File to OneDrive

upload_file
Destructive

Upload text-based content such as plain text, Markdown, CSV, JSON, HTML, or XML directly to OneDrive, with rename, replace, or fail conflict handling.

Instructions

Upload TEXT content (plain text, markdown, CSV, JSON, HTML, XML) to OneDrive inline via this tool call. For binary files (docx, pdf, images, etc.), use get_upload_config (HTTP/SSE) or upload_file_from_path (stdio/local) — never base64-encode binary into this tool's content param. Max ~4 MB text.

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": "upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesDestination path in colon-path format (e.g., /me/drive/root:/Documents/file.txt:/content)
contentYesText content to upload (UTF-8)
content_typeNoMIME type of the content, default text/plain. Must be a text type (text/*, application/json, application/xml, application/javascript, *+json, *+xml); binary types are rejected. It only gates this check: OneDrive decides the stored file's MIME type itself and may not keep this value.
conflict_behaviorNoConflict behavior: "rename" (default), "replace" overwrites, "fail" returns 409 on collision

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, and the description adds real behavioral context on top: a ~4 MB text ceiling and the fact that binary payloads are rejected. It does not spell out that destructive behavior comes from conflict_behavior=replace overwriting an existing file, nor what the call returns, so it stops short of full disclosure.

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?

Two sentences, front-loaded with the primary capability followed by the exclusion and its alternatives. No filler or restatement of the title.

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?

For a 4-parameter write tool with full schema coverage and annotations covering the safety profile, the description supplies the intent, the hard limits, and the correct sibling routing. The only omission is return-value shape, which is minor for an upload call.

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 100%, so baseline would be 3, but the description adds meaning beyond the schema for the content parameter by ruling out base64-encoded binary and capping size. It says nothing about path format or conflict_behavior beyond what the schema already documents.

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?

States a specific verb and resource ('Upload TEXT content ... to OneDrive inline') and immediately bounds the scope to text formats, which separates it from the sibling upload_file_from_path and from binary-upload paths. The named content types (plain text, markdown, CSV, JSON, HTML, XML) make the scope unambiguous.

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?

Gives explicit when-to-use (text content inline) and when-not-to-use with named alternatives: get_upload_config for HTTP/SSE and upload_file_from_path for stdio/local binary. It also states an explicit prohibition ('never base64-encode binary into this tool's content param'), removing the most likely misuse.

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

Deploy Server

Other Tools