First-party app
Microsoft OneDrive Microsoft OneDrive

Microsoft OneDrive

Browse, upload, move, share and search files in Microsoft OneDrive via the Microsoft Graph drive API.

stable Documents & FilesStorage

About

Microsoft OneDrive ships in the w6w first-party pack. It declares 18 actions, 3 health checks, and the host runs its code in a sandbox that never sees the credential.

App id
io.w6w.onedrive
Version
0.1.3
Author
w6w
Licence
MIT
Categories
Documents & Files · Storage

Overview

Microsoft OneDrive stores a user’s files, and this app browses, uploads, shares and searches them through the Microsoft Graph drive API — the same surface behind OneDrive personal and business accounts and SharePoint document libraries alike.

It covers everyday file management: listing folder contents, reading and searching for items across a whole drive, creating folders, uploading text-based files, and copying, moving, renaming or deleting an item once you’ve found it. Sharing actions create OneDrive’s own view or edit links, list and remove existing permissions, and send a direct sharing invite to a specific person by email. A change-tracking action reports what has been added, updated or removed since a previous run, which is the only way to detect a deletion — a simple listing can’t.

This app works across a user’s personal drive, a colleague’s shared drive, or a SharePoint library, all addressed the same way. A live check reports remaining storage headroom directly from OneDrive’s own quota data, alongside a credential check, since Microsoft publishes no general status page for the service itself.

Build with Microsoft OneDrive

Three routes to the same 18 actions. The Workflow tab is generated from Microsoft OneDrive's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.

Copy Item

copy-item

Start an asynchronous copy of a file or folder. Returns 202 and the monitor URL; the copy is not finished when this action returns.

Create Folder

create-folder

Create a folder inside another folder, or in the drive root.

Create Sharing Link

create-link

Create a sharing link for a file or folder, or return the existing link for the same settings.

Delete Item

delete-item

Delete a file or folder, moving it to the recycle bin. Deleting a folder deletes its contents.

Delete Permission

delete-permission

Revoke one sharing permission from a file or folder — a link, or a person's access.

Get File Download URL

get-download-url

Return a short-lived, pre-authenticated download URL for a file, plus its name, size and MIME type. Returns the URL rather than the bytes — see the README.

Get Drive

get-drive

Read one drive's metadata, including its storage quota facet and its driveType (personal, business or documentLibrary).

Get Item

get-item

Read one file or folder's metadata. Addressed by id or by path — the usual way to turn a path into a stable item id.

List Changes

list-changes

Track additions, updates and deletions across a whole drive using Graph delta query. Deletions appear as items carrying a `deleted` facet.

List Children

list-children

List the files and folders directly inside a folder, or inside the drive root when no item is addressed.

List Drives

list-drives

List the drives the signed-in user can reach — their own OneDrive plus any SharePoint document libraries — and return the ids the other actions address.

List Permissions

list-permissions

List the sharing permissions on a file or folder. Entries carrying `inheritedFrom` are inherited from an ancestor and cannot be deleted here.

List Shared With Me

list-shared-with-me

List the files and folders other people have shared with the signed-in user. Read the `remoteItem` facet for the drive id and item id that address the original.

Move Item

move-item

Move a file or folder into another folder, optionally renaming it on the way. The item keeps its id.

Rename Item

rename-item

Rename a file or folder in place.

Search Items

search-items

Search a drive for files and folders. Matches filename, metadata and file content — it is a search, not a filename filter.

Send Sharing Invite

send-sharing-invite

Grant named people access to a file or folder, with or without emailing them an invitation.

Upload File

upload-file

Upload text content as a new file, or replace an existing file's contents, in a single request. Up to 250 MB; text only.

A workflow step names the app and the action, and the editor fills in the connection when you pick one. This is the Step shape from the workflow spec, carrying Microsoft OneDrive's real ids.

{
  "manifestVersion": "2",
  "name": "onedrive-example",
  "steps": [
    {
      "id": "create-folder",
      "uses": {
        "app": "io.w6w.onedrive",
        "action": "create-folder",
        "connection": "conn_YOUR_CONNECTION_ID"
      },
      "with": {
        "name": "<name>"
      }
    }
  ]
}

Here are some of the things you can do

  • Create Folder

    perform
    create-folder
  • Copy Item

    perform
    copy-item
  • Create Sharing Link

    perform
    create-link
  • Get File Download URL

    read
    get-download-url
  • Get Drive

    read
    get-drive

+13 more actions available

Every app-specific value here is a blank you have to fill in. An app action is reached through the connection that authenticates it, so the address is a connection id, not the app id — and connections belong to your account, so a public page cannot know yours. Create one for Microsoft OneDrive, then fill in the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the parameters that action declares. The call itself is real — the shape is transcribed from the studio's own snippet builder, which prints the same kind of blanks — but nothing in it is specific to Microsoft OneDrive. The Workflow tab is where this app's real ids are.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { W6wClient, isActionRun } from "@w6w/sdk";

// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();

const envelope = await client.run({
  urn: "conn_YOUR_CONNECTION_ID",
  action: "upload-file",
  payload: {
    // driveId: "<value>",
    // itemId: "<value>",
    // itemPath: "<value>",
    // name: "<value>",
    content: "<value>",
    // contentType: "<value>",
  },
});

if (isActionRun(envelope)) console.log(envelope.value);
Install the CLI
npm install -g @w6w/cli
CLI
w6w run conn_YOUR_CONNECTION_ID --action upload-file --payload '{"content":"<value>"}'

Give an AI agent Microsoft OneDrive — without giving it Microsoft OneDrive's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.

One tool call
{
  "name": "w6w_invoke",
  "arguments": {
    "ref": "app:io.w6w.onedrive#create-folder",
    "input": {
      "name": "<name>"
    }
  }
}

Every tool names its target with a single ref. The app: form above doesn't name a connection at all — the host resolves which of the caller's Microsoft OneDrive connections to sign with, and refuses rather than guesses when the answer is ambiguous.

What the agent gets

Credentials it can't read

The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.

A tool surface scoped to the caller

Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.

A durable workflow in one call

Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.

Health-aware discovery

Microsoft OneDrive's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.

The MCP surface is part of the hosted platform. Microsoft OneDrive itself is MIT, and the runtime that executes it is source-available (FSL).

Request MCP access

Health checks

Microsoft OneDrive declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

OneDrive platform status

quota

Drive storage headroom

Bytes left on the drive behind this connection, read from the `quota` facet of `GET /me/drive`. Reports the vendor's own `state` (normal / nearing / critical / exceeded) rather than re-deriving one.

quota

API request-rate headroom