Move File or Folder
move_drive_itemMove 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
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes | ID of the file or folder to move | |
| drive_id | No | SharePoint document library ID from list_site_drives. Omit for your own OneDrive | |
| if_match | No | eTag 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_name | No | New name for the item, including its extension. Omit to keep the name | |
| destination_folder_id | Yes | ID of the folder to move it into, or "root" for the top of the drive |