Rename File or Folder
rename_drive_itemRename a file or folder in OneDrive or a SharePoint document library while keeping it in its current location.
Instructions
Rename a file or folder in OneDrive or a SharePoint document library, leaving it where it is.
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>",
"new_name": "<new_name>"
},
"name": "rename_drive_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes | ID of the file or folder to rename | |
| 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 | Yes | New name, including the file's extension |