Skip to main content
Glama

Upload File

drive_upload

Upload a local file to OneDrive as a new item or replace an existing file's contents, returning the OneDrive item.

Instructions

Upload a local file to OneDrive, as a new file (parent_id or parent_path) or by replacing an existing file's contents (item_id). Reads from the local disk, inside the allowed folders only. Returns the OneDrive item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoNew file: name in OneDrive (default: local file name).
item_idNoReplace the contents of this existing file.
if_existsNoNew file: what to do if the name is taken.fail
parent_idNoNew file: destination folder ID ('root' allowed).
account_idNoAccount ID or email address. Omit when only one account is signed in.
local_pathYesLocal file path inside the server's allowed folders. Hidden and secret files are refused.
parent_pathNoNew file: destination folder path, e.g. /Documents.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemYes
statusYes
summaryYesOne-line human summary. The tool's text content is this result serialized as JSON (summary included), so a client that ignores structuredContent still sees every field.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false. Beyond that, the description adds real context: reads occur from the local disk, only within allowed folders, hidden/secret files are refused, and the OneDrive item is returned. It doesn't cover permissions or rate limits, but it meaningfully augments the annotation profile.

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?

Three tight sentences, front-loaded with the core action and mode split, then the disk-access constraint, then the return value. No filler; every clause carries information.

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?

With an output schema present, the description needn't detail return values, though it helpfully notes one is returned. For a non-idempotent write tool with seven parameters, it covers the local-path restrictions and mode selection well, but omits any note on auth/account scoping or what a replace-mode failure looks like.

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 the baseline is 3, but the description adds semantic grouping the schema lacks: it ties parent_id/parent_path to the 'new file' mode and item_id to the 'replace contents' mode, clarifying mutual exclusivity that the flat schema does not express.

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 (upload) and resource (a local file to OneDrive), and explicitly separates the two operating modes via the parameters that select them (parent_id/parent_path for new files vs item_id for replacement). An agent can distinguish this from drive_copy or drive_share without opening a schema.

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 description clearly routes the agent to the correct mode by naming the parameters for each (new file vs replace). It does not, however, mention when not to use it or point to an alternative sibling (e.g., drive_copy for server-side copies), leaving some usage inference to the agent.

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