Catalogue / onedrive-rube-file-ops
onedrive-rube-file-ops
Older skill: source not recordedSignedWorks with Microsoft OneDrive through the Rube MCP hub and its Composio one_drive toolkit: keyword search, folder browsing, uploads and downloads, folder creation, renames, moves, copies, recycle-bin deletion, share links, user invitations, permission inspection, quota checks, version history and Sh…--- name: onedrive-rube-file-ops description: > Works with Microsoft OneDrive through the Rube MCP hub and its Composio one_drive toolkit: keyword search, folder browsing, uploads and downloads, folder creation, renames, moves, copies, recycle-bin deletion, share links, user invitations, permission inspection, quota checks, version history and SharePoint change tracking. Every operation that alters or exposes stored files requires reading the planned change back to the user and receiving an explicit yes before executing. Use when the user asks to locate, transfer, reorganize, share or audit files stored in OneDrive via Rube, or to report on OneDrive storage and file versions. Not for local filesystem tasks, other cloud storage services, or editing the contents of a file. ---
OneDrive work through the Rube hub
Run every OneDrive interaction through the one_drive toolkit exposed by the Rube MCP server. Treat the live tool catalog as the authority on parameter names; treat this file as your decision map for what to do and when to stop and ask.
Session start
- Ping
RUBE_SEARCH_TOOLS. No response means the Rube endpoint (rube.app/mcp) is not registered in the client — tell the user to add it as a server; the endpoint itself needs no API key. - Call
RUBE_MANAGE_CONNECTIONSfor toolkitone_drive. If the status is not ACTIVE, hand the user the authorization link from the response so they can complete Microsoft OAuth, then re-check. - Before the first use of any tool, search the catalog for its slug and read the returned schema. Inputs drift between releases, so prefer the schema over this document.
This skill does not cover installing or administering the MCP client, or Rube account management beyond registering the endpoint and finishing the Microsoft sign-in.
First decision: read or write?
Classify the request before touching anything.
Reads — proceed freely. Searching, listing folders, fetching item details, listing permissions, drive metadata, quota, version history, delta queries, and downloading a file to the local machine change nothing others can see.
Writes — require a ticket. Uploading, creating a folder, renaming or editing metadata, moving, copying, deleting, inviting a person, and minting a share link each either alter the drive that everyone with access already sees, or expose content to new people (and invitations may email them). Gate all of them uniformly instead of judging severity case by case.
The ticket: confirming any write
For every gated operation, compose a short read-back containing the operation verb, the exact item names with full paths, and the destination or audience — plus the extras below — then end your turn and wait. Silence, a shrug, or "I guess" is not consent; only an explicit affirmative is. Once you have it, re-resolve the item and folder IDs fresh, execute, and report what happened.
| Operation | Read back additionally | Behavior to know after the yes | |---|---|---| | Upload | source filename, destination folder | clashes auto-rename (a second report.xlsx lands under a suffixed name); there is no overwrite switch; large files chunk themselves | | New folder | name and parent | a duplicate name auto-increments to Archives 2 | | Rename / metadata edit | old name, new name or field | applied to the single resolved item | | Move | destination folder name plus its ID | destination goes inside parentReference as an ID only; same drive only | | Copy | destination, optional new name, conflict choice | asynchronous; the response carries a progress URL to poll; conflict options fail, replace, rename | | Delete | the full item list, the count, and a warning if a subtree goes | items land in the recycle bin, whose retention is finite; pass the response ETag via if_match | | Invite | recipient addresses, role, expiry, whether an email fires | at least one of require_sign_in or send_invitation must be true | | Share link | audience and link type, expiry | the URL is reachable by that audience immediately |
Never fold many deletions or moves under one vague approval — enumerate every affected item.
Reading: locate, inspect, report
- Sanity-check reachability with
ONE_DRIVE_GET_DRIVE. - Search with
ONE_DRIVE_SEARCH_ITEMSusing plain keywords only —northwind invoice, never patterns. Wildcards are silently stripped, operator-looking words such asfolder:orpath:are treated as ordinary text, a wildcard-only query returns HTTP 400, and there is no path filtering, so browse folders instead when location matters. ONE_DRIVE_ONEDRIVE_LIST_ITEMSreturns root entries only; descend one level at a time withONE_DRIVE_GET_ITEMandexpand_relations: ["children"](thumbnails also work as an expansion).- For exact-name matches prefer
ONE_DRIVE_ONEDRIVE_FIND_FILEandONE_DRIVE_ONEDRIVE_FIND_FOLDER; useONE_DRIVE_LIST_DRIVESwhen even the drive is unclear.user_iddefaults tome; if you also passdrive_id, the drive ID wins. - Drain pagination: keep feeding back the
skip_tokenor@odata.nextLinkvalue until a response arrives without one;topsets page size (search defaults to 200). - Space out item-detail calls — bursts invite HTTP 429, and you must wait the duration in the
Retry-Afterheader before retrying.
Identity rules: copy IDs verbatim from responses, case-sensitive, never reconstructed from a web URL or sharing link. Business drives issue a 01 prefix plus 32 characters, e.g. 01K7P2XNWQBTY3ZRC8LVD4HJA9OMEFGUS; personal drives look like B39D5E21C7F08A64!4721. If a drive ID triggers an "ObjectHandle is Invalid" error from Graph, re-resolve the drive through ONE_DRIVE_LIST_DRIVES and retry.
Access auditing: permissions cannot be expanded through GET_ITEM — call ONE_DRIVE_GET_ITEM_PERMISSIONS, and expect inherited and owner entries in the reply, not just recent grants. Item paths in permission contexts use the :/path/to/item:/ shape; ordinary folder paths start with / as in /Clients/Northwind/2026.
Drive facts: ONE_DRIVE_GET_QUOTA reports total, used and remaining space; ONE_DRIVE_GET_ITEM_VERSIONS takes the file's item_id. Change tracking exists only for SharePoint site drives via ONE_DRIVE_LIST_SITE_DRIVE_ITEMS_DELTA: token latest returns a baseline token with no items, and subsequent tokens (a nextLink URL or timestamp) page through changes; crawl with batching and resume logic because large drives take minutes.
Writing: the four changes people ask for
Once a ticket is approved, resolve every ID, then act.
- Adding. Resolve the destination with
ONE_DRIVE_ONEDRIVE_FIND_FOLDER, thenONE_DRIVE_ONEDRIVE_UPLOAD_FILE(file object withs3key,mimetype,name, plus the folder) orONE_DRIVE_ONEDRIVE_CREATE_FOLDER(name,parent_folderas path or ID). - Rearranging. Rename via
ONE_DRIVE_UPDATE_DRIVE_ITEM_METADATA; move viaONE_DRIVE_MOVE_ITEMwithparentReference: {"id": "folder-id"}— names and paths are rejected here. Cross-drive moves fail by design; useONE_DRIVE_COPY_ITEMwithparent_reference,name, or both, plus a@microsoft.graph.conflictBehaviorchoice, then poll the returned monitor URL. - Removing.
ONE_DRIVE_DELETE_ITEMwithif_matchwhen an ETag is available. - Granting access. Audit first with the permissions call, then
ONE_DRIVE_INVITE_USER_TO_DRIVE_ITEMorONE_DRIVE_CREATE_LINK. A staleitem_idon an invite quietly re-permissions the wrong item — re-verify the ID in the same breath as the call.
Downloads need no ticket: ONE_DRIVE_DOWNLOAD_FILE with item_id and a file_name that keeps its extension.
Two worked exchanges
Read. "Where are the Northwind invoices?" — GET_DRIVE, then SEARCH_ITEMS with q of northwind invoice, search_scope of drive, select of id,name,webUrl,parentReference; follow the skip tokens; answer with paths and URLs.
Write. "Put vendor-contract-v3.pdf into /Clients/Northwind/2026 and let ana@rime.io view it until end of March." — find the folder, check for a name clash, then present one ticket covering both writes: the upload (noting auto-rename on clash) and an invite for ana@rime.io, role read, expiration_date_time 2026-03-31T23:59:59Z, with send_invitation false and require_sign_in true unless the user prefers a notification email. Only after an explicit yes, execute both and report the new item ID and the grant.
Compact signatures
| Tool | Call shape | Returns | |---|---|---| | ONE_DRIVE_SEARCH_ITEMS | q, search_scope root or drive, top, select, orderby, skip_token | paged matches plus next token | | ONE_DRIVE_ONEDRIVE_LIST_ITEMS | user_id, select, top | root entries; paginates internally | | ONE_DRIVE_GET_ITEM | item_id, expand_relations | metadata; children or thumbnails only | | ONE_DRIVE_ONEDRIVE_FIND_FILE / _FIND_FOLDER | name, folder | exact match with its id | | ONE_DRIVE_LIST_DRIVES | user, group or site scope | drives | | ONE_DRIVE_GET_DRIVE | drive_id | drive metadata | | ONE_DRIVE_GET_QUOTA | — | total, used, remaining | | ONE_DRIVE_GET_ITEM_VERSIONS | item_id | version list | | ONE_DRIVE_GET_ITEM_PERMISSIONS | item_id | grants including inherited and owner | | ONE_DRIVE_LIST_SITE_DRIVE_ITEMS_DELTA | site_id, token | changes plus next token | | ONE_DRIVE_ONEDRIVE_UPLOAD_FILE | file (s3key, mimetype, name), folder | new item | | ONE_DRIVE_DOWNLOAD_FILE | item_id, file_name, drive_id optional | file bytes | | ONE_DRIVE_ONEDRIVE_CREATE_FOLDER | name, parent_folder | folder | | ONE_DRIVE_UPDATE_DRIVE_ITEM_METADATA | item_id, fields | updated item | | ONE_DRIVE_MOVE_ITEM | itemId, parentReference {"id": ...} | relocated item | | ONE_DRIVE_COPY_ITEM | item_id, parent_reference and/or name, conflict behavior | async monitor URL | | ONE_DRIVE_DELETE_ITEM | item_id, if_match optional | recycle-bin placement | | ONE_DRIVE_INVITE_USER_TO_DRIVE_ITEM | item_id, recipients (email or object_id), roles, send_invitation, require_sign_in, message max 2000 chars, expiration_date_time, retain_inherited_permissions | permission grant | | ONE_DRIVE_CREATE_LINK | item_id, link type and scope | link URL |
Vendor reference for deeper detail: composio.dev/toolkits/one_drive.
Boundaries
- Never put wildcards or operator-style terms into a search query.
- Never run any gated write without the read-back and an explicit yes in that same conversation.
- Never invent, truncate, or re-case an identifier; use Graph responses verbatim.
Adapted from the one-drive-automation skill in the MIT-licensed davepoon/buildwithclaude project; retain this attribution and license notice when redistributing.
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 10.9 kB | 9fd2a496b1e2 |
| THIRD_PARTY_NOTICES.md | 1.4 kB | 25601a8a1c02 |
| examples.json | 1.9 kB | 852106cc9273 |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 1.0.0 Current | Not recorded | 10 Oct 2026 |
Locking a skill to one version needs Pro.