Skip to main content
Glama
Wh1isper

MCP Email Server

move_emails

Destructive

Move emails between IMAP folders using UIDs from list_emails_metadata. Specify destination_mailbox or destination_role='junk'; missing or ambiguous folders require an explicit destination.

Instructions

Move emails between IMAP folders using UIDs from list_emails_metadata in source_mailbox. Specify exactly one of destination_mailbox or destination_role='junk' to discover the Junk folder via \Junk, then common names. Missing or ambiguous discovery requires an explicit destination; no folder is created. To restore from Junk, list it again for current UIDs and move to INBOX with that explicit source_mailbox. This requests a move, not guaranteed spam training or reporting. Partial or ambiguous effects report per-ID succeeded/failed/unknown status and are not retried.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
email_idsYesList of email_id to move (obtained from list_emails_metadata).
account_nameYesThe name of the email account.
source_mailboxNoMailbox in which email_ids were listed; UIDs are not transferable across mailboxes.INBOX
destination_roleNoDiscover the Junk destination. Mutually exclusive with destination_mailbox.
destination_mailboxNoExact destination mailbox. Omit only when destination_role='junk' is supplied.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.11.0
    • addedInput schema / properties / destination_mailbox / anyOf
      Added value: +[
      +  {
      +    "maxLength": 1024,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / destination_mailbox / default
      Added value: +null
    • changedInput schema / properties / destination_mailbox / description
      Previous value: -"The destination mailbox/folder to move emails to."New value: +"Exact destination mailbox. Omit only when destination_role='junk' is supplied."
    • removedInput schema / properties / destination_mailbox / maxLength
      Removed value: -1024
    • removedInput schema / properties / destination_mailbox / type
      Removed value: -"string"
    • addedInput schema / properties / destination_role
      Added value: +{
      +  "anyOf": [
      +    {
      +      "const": "junk",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Discover the Junk destination. Mutually exclusive with destination_mailbox.",
      +  "title": "Destination Role"
      +}
    • changedInput schema / properties / source_mailbox / description
      Previous value: -"The source mailbox containing the emails."New value: +"Mailbox in which email_ids were listed; UIDs are not transferable across mailboxes."
    • changedInput schema / required
      Previous value: -[
      -  "account_name",
      -  "email_ids",
      -  "destination_mailbox"
      -]New value: +[
      +  "account_name",
      +  "email_ids"
      +]
  2. Addedv1.1.1
  3. Removedv1.0.1
  4. Addedv0.8.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructive/non-idempotent/open-world, and the description adds substantial non-obvious context: no folder is created, missing/ambiguous discovery requires an explicit destination, partial effects report per-ID succeeded/failed/unknown and are not retried, and the call 'requests a move, not guaranteed spam training'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the destination-mutual-exclusivity rule are front-loaded, and the sentences are dense with operative detail rather than filler. It runs long, but nearly every clause carries an actionable constraint, so waste is minimal.

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?

An output schema exists so return formatting need not be repeated, yet the description still covers the per-ID success/failure/unknown reporting semantics that matter for this destructive, non-idempotent operation. Nothing an agent needs to invoke it safely 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%, so the baseline is 3, but the description adds behavioral meaning beyond the schema fields – the Junk discovery mechanics behind destination_role='junk' and the source_mailbox UID-not-transferable constraint that governs correct parameter pairing.

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 and resource ('Move emails between IMAP folders') and pins the identifier semantics ('using UIDs from list_emails_metadata in source_mailbox'). This clearly distinguishes it from siblings like delete_emails, archive_emails, and save_to_mailbox.

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?

Gives explicit invocation rules: exactly one of destination_mailbox or destination_role='junk', and a concrete restore-from-Junk workflow with list-again-then-move-to-INBOX. It does not, however, contrast when to choose this over sibling moves like archive_emails, so it stops short of a 5.

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