Skip to main content
Glama

Upload Local File to OneDrive

upload_file_from_path
Destructive

Upload a local file from the server's filesystem to OneDrive; auto-creates folders and supports files up to 250 MB.

Instructions

Upload a local file to OneDrive by reading it from disk on the server. The file must exist on this machine's filesystem. If you generated the file in a cloud container (e.g., claude.ai), first use Desktop Commander's write_file to save it to the user's local filesystem, then call this tool with that local path. Supports files up to 250 MB (chunked session upload above 4 MB). Intermediate folders are auto-created.

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": {
      "local_path": "<local_path>",
      "path": "<path>"
    },
    "name": "upload_file_from_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesGraph API destination path ending with :/content (e.g., /me/drive/root:/Documents/file.docx:/content)
local_pathYesAbsolute path to the local file to upload
content_typeNoMIME type override. Auto-detected from file extension if omitted.
conflict_behaviorNoConflict behavior: "rename" (default), "replace" overwrites, "fail" returns an error

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare a non-read-only, destructive operation, and the description adds real operational context: 250 MB cap, chunked session upload above 4 MB, and auto-created intermediate folders. However, it does not reconcile the destructiveHint=true annotation with the schema's non-destructive default conflict_behavior='rename', nor does it mention auth/permission requirements or what is returned.

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?

Four short sentences, each carrying a distinct fact (mechanism, prerequisite, container workaround, limits/folder creation), with the core definition front-loaded. The container workaround sentence is long but earns its length by preventing a common failure mode.

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 the main preconditions and side effects (size limits, chunking threshold, folder creation). It stops short of describing the response shape and permission requirements, which an agent would want before calling a destructive upload.

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 is 3, and the description adds meaning beyond it by clarifying that local_path refers to the server's filesystem, not the user's — the single most likely source of misuse. It does not discuss path format or content_type behavior, having left those to the schema.

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 ('Upload a local file to OneDrive') plus the distinguishing mechanism ('reading it from disk on the server'), which separates it from a content-based upload sibling without naming that sibling. Sibling differentiation is implied by mechanism rather than explicit, so not a 5.

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?

Gives a hard prerequisite ('The file must exist on this machine's filesystem') and a concrete fallback workflow for cloud containers (write_file first, then this tool with the local path). It never names the alternative upload tool or says when that one is preferable, so 4 rather than 5.

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