Skip to main content
Glama

Move folder

move_folder
Idempotent

Move 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

NameRequiredDescriptionDefault
folderYesID of the folder to move, as list_folders returns it, or the folder name.
parentNoID or name of the folder to move it under. Leave out when topLevel is true.
topLevelNoSet to true to move the folder to the top level of the mailbox. Leave out when parent is given.
accountIdNoAccount to operate on. Optional when exactly one account is connected.

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.31.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it explains what is preserved (name, messages, subfolders), how Gmail labels behave, which system folders are protected, and that IMAP folders and subfolders get new IDs after the move. It also tells the agent what to do if a message ID stops working.

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?

The definition is front-loaded with the action and then layers constraints, side effects, and prerequisites in a compact sequence. Every sentence contributes operational information without padding.

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 four-parameter mutation tool with full schema coverage and an output schema, the description covers prerequisites, destination rules, protected folders, post-move ID behavior, and follow-up steps. An agent has enough information to invoke it correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description adds meaningful semantics by making parent and topLevel mutually exclusive and spelling out invalid destination cases. It does not go much beyond the schema for the folder or accountId parameters, which are already documented.

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?

The description opens with a specific verb and resource ('Move a folder') and immediately distinguishes the two destination modes: under another folder or to the top level. That gives an agent a clear action boundary against siblings such as rename_folder or delete_folder.

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

Usage Guidelines4/5

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

It gives a clear prerequisite ('Call list_folders first') and an explicit input rule to use either parent or topLevel, but not both. It also lists invalid destinations, though it stops short of naming alternative tools for related operations such as moving messages.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.