Skip to main content
Glama

Move File or Folder

move_drive_item
Destructive

Move a file or folder into another folder in the same OneDrive or SharePoint library, optionally with a new name, using Microsoft Graph.

Instructions

Move a file or folder to another folder in the same OneDrive or SharePoint document library, optionally renaming it. Graph can't move between drives. To put an item in another library: copy_drive_item, confirm the copy is in the destination with list_drive_items or list_site_items, and only then delete_drive_item the original.

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": "move_drive_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
item_idYesID of the file or folder to move
drive_idNoSharePoint document library ID from list_site_drives. Omit for your own OneDrive
if_matchNoeTag from get_drive_item or list_drive_items. The change happens only if the item hasn't changed since; otherwise it fails with precondition-failed and nothing changes
new_nameNoNew name for the item, including its extension. Omit to keep the name
destination_folder_idYesID of the folder to move it into, or "root" for the top of the drive

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so safety is covered. The description adds real behavioral context beyond them: the hard cross-drive limitation and the ordering constraint that the copy must be verified before the delete. It does not mention permission requirements or that the source path is removed from the original folder, which is implied but not stated.

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 sentences, front-loaded with the core action, then the drive-boundary caveat, then the fallback procedure. No filler, no restatement of the title, and the most decision-relevant limitation appears early.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter mutation tool with a full schema and no output schema, the description covers the action, its hard limit, and the safe alternative path. An agent has everything needed to decide whether to call it and how to route around its limitation.

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% and each parameter is documented in the schema, including if_match's precondition-failed behavior and 'root' as a destination value. The description only echoes the optional rename (new_name) without adding format or edge-case detail, so it stays at the baseline where the schema does the work.

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 (move), resource (file or folder), and the scope constraint (within the same OneDrive/SharePoint document library), plus the optional rename side effect. This is enough to distinguish it from rename_drive_item, copy_drive_item, and delete_drive_item without opening any sibling schema.

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

Usage Guidelines5/5

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

Explicitly states the negative case ('Graph can't move between drives') and then prescribes the exact alternative workflow by name: copy_drive_item, verify with list_drive_items or list_site_items, then delete_drive_item. This is a when-not plus named alternatives, the top of the scale.

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