Skip to main content
Glama

Copy File or Folder

copy_drive_item
Destructive

Copies a file or folder, with a folder's contents, into a OneDrive or SharePoint document library folder. Name clashes fail unless conflict_behavior is set to rename.

Instructions

Copy a file or folder, with a folder's contents, to a folder in OneDrive or any SharePoint document library. Graph copies in the background, so the copy may take a while to appear. Never overwrites: a name clash fails unless conflict_behavior is rename.

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": {
      "item_id": "<item_id>",
      "destination_folder_id": "<destination_folder_id>"
    },
    "name": "copy_drive_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
item_idYesID of the file or folder to copy
drive_idNoSharePoint document library ID the item is in, from list_site_drives. Omit for your own OneDrive
new_nameNoName for the copy, including its extension. Omit to keep the name
conflict_behaviorNoOn a name clash: "fail" (default) or "rename", which adds a number to the copy's name. Not supported on personal OneDrive
destination_drive_idNoDrive ID to copy into, when it differs from the item's own drive. To copy from SharePoint into your own OneDrive, pass your OneDrive's drive ID (the Drive ID get_drive_item shows for one of your files)
destination_folder_idYesID of the folder to copy it into, or "root" for the top of the drive

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.1

TDQS

A3.8/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: the copy runs asynchronously in Graph and may take time to appear, and it never overwrites unless conflict_behavior is rename. That is exactly the operational detail an agent needs. It doesn't state permission requirements or whether the item_id is validated up front, which keeps it from a 5.

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, zero waste, and the most decision-relevant facts, the background-copy latency and the no-overwrite rule, are front-loaded.

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?

Given 100% schema coverage and no output schema, the description covers the essential risk profile: async completion and overwrite behavior. It leaves a gap on what is returned (e.g. the new item's ID) and how to later confirm the background copy finished, which matters when there is no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so all six parameters are documented in structured data. The description reinforces conflict_behavior's default and effect but adds no format, default, or cross-parameter nuance the schema lacks; baseline 3 applies.

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 ("Copy a file or folder") plus scope ("with a folder's contents, to a folder in OneDrive or any SharePoint document library"). It does not explicitly contrast with move_drive_item, so an agent must infer the copy-vs-move distinction, but the operation itself is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the destination language and the conflict_behavior note, but there is no explicit when-to-use guidance or named alternative (e.g. move_drive_item or copy for OneNote pages). An agent can act correctly, but routing between siblings is left to inference.

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