Skip to main content
Glama

move_message

Destructive

Move an email message to another folder in the same account, with a preview and human approval before execution.

Instructions

Move a message to another folder of the same account. TWO-PHASE, HUMAN-APPROVED: the first call (no request_id) executes nothing — it returns status=approval_required with a preview of exactly what would happen and a request_id. A human approves out of band (GigaMail console, CLI or Telegram, behind Windows Hello / Touch ID); the second call with that request_id executes the payload that was approved (the approved arguments, not the ones passed the second time). Requests expire (default 15 min); identical pending requests are deduplicated; more than 20 requests/hour per tool are refused (status=rate_limited). Every phase is written to the audit log. The preview shows the message's sender and subject and, above all, the folder it leaves and the folder it lands in, by readable name. Returns {success}. Nothing is destroyed and the move can be undone by moving the message back, but a move is enough to hide mail from the human who is supervising, so it is approved like any other action that changes what the mailbox looks like. Note: on IMAP the message gets a new UID in the destination folder, so the old message_id stops being valid. To delete a message use delete_message.

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": {
      "message_id": "<message_id>",
      "folder_id": "<folder_id>"
    },
    "name": "move_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
folder_idYesDestination folder: id (Graph) or name (IMAP) from list_folders.
account_idNoAccount to operate on (integer id from list_accounts). Omit or null = the user's active account.
message_idYesMessage id exactly as returned by list_messages / list_unread / search_mail (opaque Graph id for Microsoft accounts, numeric IMAP UID for IMAP accounts). Ids are account-specific: never reuse one across accounts.
request_idNoOmit on the first call. On the first call the tool does NOT execute: it returns status=approval_required, a preview and a request_id. A human must approve that request_id out of band (GigaMail console, `gigamail approvals approve`, or Telegram — all behind Windows Hello / Touch ID / Linux PIN). Then call again with the same request_id to execute. The agent cannot approve; repeating the call without approval just returns awaiting_approval.
source_folderNoFolder the message is currently in (IMAP only; empty = inbox).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.8
    • changedInput schema / properties / request_id / description
      Previous value: -"Omit on the first call. On the first call the tool does NOT execute: it returns status=approval_required, a preview and a request_id. A human must approve that request_id out of band (GigaMail console, `gigamail approvals approve`, or Telegram — all behind Windows Hello / Touch ID). Then call again with the same request_id to execute. The agent cannot approve; repeating the call without approval just returns awaiting_approval."New value: +"Omit on the first call. On the first call the tool does NOT execute: it returns status=approval_required, a preview and a request_id. A human must approve that request_id out of band (GigaMail console, `gigamail approvals approve`, or Telegram — all behind Windows Hello / Touch ID / Linux PIN). Then call again with the same request_id to execute. The agent cannot approve; repeating the call without approval just returns awaiting_approval."
  2. Changed1 schema field changedv0.3.3
    • addedInput schema / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Omit on the first call. On the first call the tool does NOT execute: it returns status=approval_required, a preview and a request_id. A human must approve that request_id out of band (GigaMail console, `gigamail approvals approve`, or Telegram — all behind Windows Hello / Touch ID). Then call again with the same request_id to execute. The agent cannot approve; repeating the call without approval just returns awaiting_approval.",
      +  "title": "Request Id"
      +}
  3. Changed4 schema fields changedv0.3.0
    • addedInput schema / properties / account_id / description
      Added value: +"Account to operate on (integer id from list_accounts). Omit or null = the user's active account."
    • addedInput schema / properties / folder_id / description
      Added value: +"Destination folder: id (Graph) or name (IMAP) from list_folders."
    • addedInput schema / properties / message_id / description
      Added value: +"Message id exactly as returned by list_messages / list_unread / search_mail (opaque Graph id for Microsoft accounts, numeric IMAP UID for IMAP accounts). Ids are account-specific: never reuse one across accounts."
    • addedInput schema / properties / source_folder / description
      Added value: +"Folder the message is currently in (IMAP only; empty = inbox)."
  4. First observedv0.1.3

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only supply the generic safety profile (destructiveHint=true, readOnlyHint=false); the description adds substantive behavior the agent cannot infer: two-phase human approval via Windows Hello / Touch ID, argument-pinning ('the approved arguments, not the ones passed the second time'), 15-minute expiry, deduplication, hourly rate limits with status=rate_limited, audit logging, and the IMAP UID invalidation caveat. It also reconciles the destructiveHint=true flag with its own claim that 'nothing is destroyed' by explaining that a move can hide mail from a supervising human, so no annotation contradiction arises.

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 two-phase model are front-loaded in the first sentence, and every subsequent clause carries operational weight (expiry, rate limit, audit, UID change). It is dense and slightly long, partly restating approval mechanics already present in the request_id schema field, but nothing is 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?

There is no output schema, and the description still covers the return value ('Returns {success}'), status values (approval_required, awaiting_approval, rate_limited), the preview contents, and the post-move IMAP UID consequence. For a destructive, multi-account, approval-gated tool this leaves no operational gap an agent would need filled.

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 a rule absent from the schema: on the second call the executed payload is the previously approved argument set rather than the newly passed one. It also clarifies that the preview surfaces the destination folder by readable name, which helps the agent reason about folder_id.

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 first sentence names a specific verb and resource plus a scope constraint ('another folder of the same account'), and the closing sentence explicitly routes deletion elsewhere ('To delete a message use delete_message'). An agent can distinguish this from delete_message, mark_read, and list_messages without opening any schema.

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?

The description states exactly how to invoke it (call once without request_id, then again with the returned request_id after human approval) and names the alternative for the adjacent intent ('To delete a message use delete_message'). It also gives the conditions under which calls are refused (expiry, deduplication, 20 requests/hour).

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