Skip to main content
Glama

MCP Emails

Organize Email

email_organize

Move, copy, flag or archive messages you name by message_id, in one inbox. Get message ids from email_read first. Every action acts only on the ids you pass and is undone by another call: a move by a move back, archive by a move into the Inbox, flag by the opposite flag, and a copy leaves the original untouched. Copy follows the CONNECTOR, not the address: inbox_list reports it per inbox as capabilities.copy, true for every IMAP inbox (a Gmail address connected over IMAP included) and for Outlook, false only on the Gmail API connector, which has no copy operation at all. On Gmail a move adds the destination label and removes INBOX, leaving other labels in place; moving a message OUT of Trash or Spam into a real label also clears TRASH/SPAM, so it is a genuine restore rather than a labelled message still queued for deletion. To move everything matching a search instead of a list of ids, use email_search_and_move, which is its own tool because a wrong filter there relocates a whole inbox. Needs manage:folders; deleting is the separate email_delete tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inboxNoInbox email address, an alternative to inbox_id.
actionYesOperation to run. move = one message_id to destination_folder_id; move_batch = the same for up to 500 message_ids; copy = duplicate into destination_folder_id, original stays, wherever inbox_list reports capabilities.copy true (every IMAP inbox, a Gmail address connected over IMAP included, and Outlook, but not the Gmail API connector); copy_batch = the same for up to 500 message_ids; flag = set read/unread/flagged on message_ids via flag_action; archive = move one message_id out of the Inbox. Required: move_batch: destination_folder_id; copy: message_id; copy_batch: destination_folder_id.
inbox_idNoInbox UUID from inbox_list. Optional when the key has one inbox; pass this or `inbox`, not both — a pair naming different mailboxes is refused.
message_idNoProvider-native message id from a list or search.
flag_actionNoState to apply to every listed message; flag/unflag add or remove the star.
message_idsNoProvider-native message ids to move. Duplicates are removed, first occurrence kept, so succeeded counts distinct messages.
idempotency_keyNoReuse only when retrying the identical request within 24 hours; the retry is collapsed, not repeated. Reuse with different arguments is rejected.
destination_folder_idNoTarget folder: an alias (inbox, sent, drafts, trash, archive, spam), a folder name, or a folder id. Names and aliases resolve for you.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesNoServer notes about how this call was handled — for example an argument that was not applied because the selected action does not accept it. Written by MCP Emails, not taken from any message, and absent when there is nothing to report.
failedNo
has_moreNoTrue when messages matching the query were left UNTOUCHED because of the limit. Check this before reporting the sweep complete: re-run until it is false.
inbox_idNo
operationNo
succeededNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"Operation to run. move = one message_id to destination_folder_id; move_batch = the same for up to 500 message_ids; copy = duplicate into destination_folder_id, original stays, IMAP/Outlook/Fastmail only (never Gmail); copy_batch = the same for up to 500 message_ids; flag = set read/unread/flagged on message_ids via flag_action; archive = move one message_id out of the Inbox. Required: move_batch: destination_folder_id; copy: message_id; copy_batch: destination_folder_id."New value: +"Operation to run. move = one message_id to destination_folder_id; move_batch = the same for up to 500 message_ids; copy = duplicate into destination_folder_id, original stays, wherever inbox_list reports capabilities.copy true (every IMAP inbox, a Gmail address connected over IMAP included, and Outlook, but not the Gmail API connector); copy_batch = the same for up to 500 message_ids; flag = set read/unread/flagged on message_ids via flag_action; archive = move one message_id out of the Inbox. Required: move_batch: destination_folder_id; copy: message_id; copy_batch: destination_folder_id."
    • changedInput schema / properties / inbox_id / description
      Previous value: -"Inbox UUID from inbox_list. Optional when the key has one inbox; pass this or `inbox`, not both."New value: +"Inbox UUID from inbox_list. Optional when the key has one inbox; pass this or `inbox`, not both — a pair naming different mailboxes is refused."
  2. Changed24 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"Which operation to perform. Determines which other arguments are used."New value: +"Operation to run. move = one message_id to destination_folder_id; move_batch = the same for up to 500 message_ids; copy = duplicate into destination_folder_id, original stays, IMAP/Outlook/Fastmail only (never Gmail); copy_batch = the same for up to 500 message_ids; flag = set read/unread/flagged on message_ids via flag_action; archive = move one message_id out of the Inbox. Required: move_batch: destination_folder_id; copy: message_id; copy_batch: destination_folder_id."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "move",
      -  "move_batch",
      -  "copy",
      -  "copy_batch",
      -  "flag",
      -  "archive",
      -  "search_and_move"
      -]New value: +[
      +  "move",
      +  "move_batch",
      +  "copy",
      +  "copy_batch",
      +  "flag",
      +  "archive"
      +]
    • removedInput schema / properties / before
      Removed value: -{
      -  "description": "ISO 8601 date or datetime; return messages received strictly before (<) this instant.",
      -  "format": "date-time",
      -  "type": "string"
      -}
    • removedInput schema / properties / body
      Removed value: -{
      -  "description": "Free text to find in the message body. (On Gmail this matches the whole message, not body-only.)",
      -  "type": "string"
      -}
    • removedInput schema / properties / cc
      Removed value: -{
      -  "description": "Carbon-copy (Cc) recipient to match: email address, display name, or fragment.",
      -  "type": "string"
      -}
    • changedInput schema / properties / destination_folder_id / description
      Previous value: -"Destination folder: a canonical alias (inbox, sent, drafts, trash, archive, spam), a folder/label name (e.g. 'Receipts'), or a provider-native folder ID from folder_list. Names and aliases are resolved automatically."New value: +"Target folder: an alias (inbox, sent, drafts, trash, archive, spam), a folder name, or a folder id. Names and aliases resolve for you."
    • changedInput schema / properties / flag_action / description
      Previous value: -"Action to apply to all messages: 'read' marks as read; 'unread' marks as unread; 'flag' stars/flags; 'unflag' removes the flag/star."New value: +"State to apply to every listed message; flag/unflag add or remove the star."
    • removedInput schema / properties / flagged
      Removed value: -{
      -  "description": "true = only flagged/starred messages. Not supported on Outlook/Graph (ignored there).",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / from
      Removed value: -{
      -  "description": "Sender to match: email address, display name, or fragment (e.g. \"alice@example.com\" or \"Alice\").",
      -  "type": "string"
      -}
    • removedInput schema / properties / has_attachment
      Removed value: -{
      -  "description": "true = only messages with an attachment. Not supported on generic IMAP (ignored there).",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "Reuse only when retrying the identical request within 24 hours; the retry is collapsed, not repeated. Reuse with different arguments is rejected.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / inbox / description
      Previous value: -"Email address of the inbox to use, as a friendly alternative to inbox_id. Optional; ignored if inbox_id is given."New value: +"Inbox email address, an alternative to inbox_id."
    • changedInput schema / properties / inbox_id / description
      Previous value: -"UUID of the inbox to use. Optional when the API key has access to exactly one inbox (it is auto-selected). Alternatively pass `inbox` with an email address. If you don't know the inbox_id and several are accessible, just omit it — the response then lists every inbox with its inbox_id so you can retry (calling inbox_list does the same)."New value: +"Inbox UUID from inbox_list. Optional when the key has one inbox; pass this or `inbox`, not both."
    • removedInput schema / properties / include_folders
      Removed value: -{
      -  "description": "Optional list of folder/mailbox names to restrict the search scope. When omitted the search covers all folders.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / limit
      Removed value: -{
      -  "description": "Maximum number of matching messages to move. Default: 500.",
      -  "maximum": 500,
      -  "minimum": 1,
      -  "type": "number"
      -}
    • changedInput schema / properties / message_id / description
      Previous value: -"Provider-native message ID as returned by email_list, email_read, or email_search."New value: +"Provider-native message id from a list or search."
    • changedInput schema / properties / message_ids / description
      Previous value: -"Provider-native message IDs to move (from email_list, email_read, or email_search). Maximum 500 IDs per call."New value: +"Provider-native message ids to move. Duplicates are removed, first occurrence kept, so succeeded counts distinct messages."
    • removedInput schema / properties / query
      Removed value: -{
      -  "description": "Raw provider-native query string (escape hatch). Prefer the structured fields above. Combined with them where supported; ignored on Fastmail.",
      -  "type": "string"
      -}
    • removedInput schema / properties / since
      Removed value: -{
      -  "description": "ISO 8601 date or datetime; return messages received on/after (>=) this instant. E.g. \"2026-06-01\".",
      -  "format": "date-time",
      -  "type": "string"
      -}
    • removedInput schema / properties / subject
      Removed value: -{
      -  "description": "Text to match in the subject line. Multi-word phrases are matched as-is.",
      -  "type": "string"
      -}
    • removedInput schema / properties / text
      Removed value: -{
      -  "description": "Free text to match anywhere in the message (headers and body).",
      -  "type": "string"
      -}
    • removedInput schema / properties / to
      Removed value: -{
      -  "description": "Primary (To) recipient to match: email address, display name, or fragment.",
      -  "type": "string"
      -}
    • removedInput schema / properties / unread
      Removed value: -{
      -  "description": "true = only unread messages; false = only read messages; omit for either.",
      -  "type": "boolean"
      -}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "failed": {
      +      "type": "integer"
      +    },
      +    "has_more": {
      +      "description": "True when messages matching the query were left UNTOUCHED because of the limit. Check this before reporting the sweep complete: re-run until it is false.",
      +      "type": "boolean"
      +    },
      +    "inbox_id": {
      +      "type": "string"
      +    },
      +    "notes": {
      +      "description": "Server notes about how this call was handled — for example an argument that was not applied because the selected action does not accept it. Written by MCP Emails, not taken from any message, and absent when there is nothing to report.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "operation": {
      +      "type": "string"
      +    },
      +    "succeeded": {
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "move",
      -  "move_batch",
      -  "flag",
      -  "archive",
      -  "search_and_move"
      -]New value: +[
      +  "move",
      +  "move_batch",
      +  "copy",
      +  "copy_batch",
      +  "flag",
      +  "archive",
      +  "search_and_move"
      +]
  4. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description goes far beyond the annotations: it explains reversibility, that copies leave the original untouched, connector-specific copy availability, Gmail label behavior, and that moving out of Trash/Spam is a true restore. This is exactly the behavioral context an agent needs for a mutating tool.

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 description is dense but every sentence earns its place; it front-loads the core operation and then layers crucial caveats. Nothing is filler, and the structure supports a complex multi-action tool without unnecessary repetition.

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 an eight-parameter mutating tool with rich annotations and an output schema, the description covers prerequisites, permission needs, alternative tools, connector differences, edge-case label behavior, and reversibility. An agent has everything needed 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 already 100%, so the baseline is 3. The description adds meaningful semantic context beyond the schema by explaining what each action does in practice, how destination_folder_id aliases resolve, and how copy behavior depends on connector capabilities.

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 set and resource: 'Move, copy, flag or archive messages you name by message_id'. It clearly separates this tool from email_delete and email_search_and_move, so an agent can distinguish it from key siblings at a glance.

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?

It explicitly tells the agent to obtain message ids from email_read first, states that search-based bulk moves belong in email_search_and_move, and notes that deletion belongs in email_delete. It also names the manage:folders permission requirement, giving clear when-to-use and when-not-to-use guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.