Move folder
move_folderMove an email folder under a different parent or to the mailbox top level while keeping its name, messages, and subfolders intact. Use it to reorganize Gmail, Outlook, or IMAP folders.
Instructions
Move a folder under another folder, or to the top level of the mailbox. The folder keeps its own name, its messages and its subfolders. Give either the destination as parent or topLevel: true, not both. The destination can't be the folder itself, one of its subfolders, or the trash, and it can't already hold a folder with the same name. In Gmail, where the folder is a label, the labels nested under it move with it. System folders such as Inbox, Sent and Trash can't be moved, and neither can a folder the account settings use as one. Use the folder ID in the result afterwards: in an IMAP mailbox the folder and its subfolders always get new IDs. Message IDs normally stay the same. If one stops working, list the folder again. Call list_folders first to find the folder IDs.
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": {
"folder": "<folder>"
},
"name": "move_folder"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes | ID of the folder to move, as list_folders returns it, or the folder name. | |
| parent | No | ID or name of the folder to move it under. Leave out when topLevel is true. | |
| topLevel | No | Set to true to move the folder to the top level of the mailbox. Leave out when parent is given. | |
| accountId | No | Account to operate on. Optional when exactly one account is connected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes |