Skip to main content
Glama

mail_move_messages

Idempotent

Move specific email messages by UID from one folder to another existing folder. Use to file or refile particular messages found in iCloud Mail.

Instructions

Move specific messages, by uid, from one folder to another folder that already exists.

Use when: the owner asks to file or refile particular messages you have found. Not for trashing (use mail_delete_messages), for moving everything that matches a filter (use mail_run_bulk_action, which previews and can be undone), or for flags (use mail_mark_messages). Parameters: uids and uidvalidity must come from the same mail_search_messages (or mail_get_messages) result for that folder; destination is an exact name from mail_list_folders or an alias (Archive, Junk, Trash, Sent, Drafts, INBOX). The destination is never created for you: create it first with mail_create_folder. Behavior: iCloud has no IMAP MOVE, so each message is copied, flagged deleted and expunged by its own uid only; nothing else in the folder is touched. A renumbered folder (uidvalidity changed) is refused before anything moves. A long list goes in chunks; if one fails, the error says how many already moved. Messages get new uids in the destination. Returns: {moved, from, to} with the uids moved and the resolved folder names. Errors: 'Could not open the folder' for an unknown source or destination (call mail_list_folders); a changed uidvalidity (search again for fresh uids); a partial move names how many already moved, so search before retrying.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidsYesMessage uids in that folder (from mail_search_messages).
folderYesMail folder, e.g. INBOX, Sent, Archive or a custom name.
destinationYesDestination folder: Archive, Junk, Trash or a custom folder name.
uidvalidityYesThe 'uidvalidity' from the result the uids came from (required: a renumbered folder is refused, not misread).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "mail_move_messagesDictOutput",
      -  "type": "object"
      -}New value: +null
  2. Addedv0.12.0

TDQS

A4.9/5.0
Behavior5/5

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

Far exceeds the annotations. Discloses the iCloud lack of IMAP MOVE and the copy/flag-deleted/expunge fallback scoped to each uid, that other messages are untouched, that a changed uidvalidity is refused before any move, chunking with partial-failure reporting, and that messages get new uids. Annotations are consistent and the description adds rich operational detail.

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?

Front-loads the purpose, then uses labeled blocks (Use when, Parameters, Behavior, Returns, Errors). Dense but every sentence carries operational value with no filler.

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?

No output schema, but the description supplies the return shape ({moved, from, to}), the recovered error conditions, and the retry guidance. For a mutation tool with complex semantics, nothing needed to invoke it correctly is missing.

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%, but the description still adds real meaning: uids and uidvalidity must originate from the same search/get result, the destination is an exact name or a specific alias list, and the destination is never created automatically. Slightly above the baseline for going beyond the schema text.

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 (messages), and precise scope (by uid, from one folder to an existing destination folder). It explicitly differentiates itself from siblings like mail_delete_messages, mail_run_bulk_action, and mail_mark_messages.

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?

Provides explicit when-to-use ('owner asks to file or refile particular messages you have found') and when-not-to-use with named alternatives for each case (trashing, filter-based bulk moves, flags). Routing is fully specified.

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