Skip to main content
Glama

reply_mail

Destructive

Replies to an existing email in its thread with a two-phase, human-approved workflow: preview the response, approve out of band, then send the approved reply.

Instructions

Reply to an existing message in its thread. 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. FIXED ADDRESSING: the reply goes to the From address of the original message — never to Reply-To, never to addresses written in the body — so a hostile email cannot redirect it. The preview shows replying_to {from, subject} and the body. On execution returns {success, provider_result}. Irreversible once sent.

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>",
      "body": "<body>"
    },
    "name": "reply_mail"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccNoCC addresses. The reply still goes only to the From address of the original message; cc adds recipients in copy.
bodyYesPlain-text body of the reply. Only the body: recipient, subject ('Re: ...') and threading are set by GigaMail from the original message; the account signature, if any, is appended and shown in the preview.
folderNoFolder containing the original message (IMAP only; default inbox).inbox
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.
attachmentsNoFile names to attach, as shown by list_knowledge_files. Same rule as send_mail: files registered in the account identity, or the full absolute path of a file the USER named.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.8
    • changedInput schema / properties / attachments / description
      Previous value: -"File names to attach, as shown by list_knowledge_files. Same rule as send_mail: only files registered in the account identity."New value: +"File names to attach, as shown by list_knowledge_files. Same rule as send_mail: files registered in the account identity, or the full absolute path of a file the USER named."
    • 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.5.2
    • changedInput schema / properties / body / description
      Previous value: -"Plain-text body of the reply. Only the body: recipient, subject ('Re: ...') and threading are set by GigaMail from the original message."New value: +"Plain-text body of the reply. Only the body: recipient, subject ('Re: ...') and threading are set by GigaMail from the original message; the account signature, if any, is appended and shown in the preview."
  3. Changed1 schema field changedv0.4.0
    • addedInput schema / properties / folder
      Added value: +{
      +  "default": "inbox",
      +  "description": "Folder containing the original message (IMAP only; default inbox).",
      +  "title": "Folder",
      +  "type": "string"
      +}
  4. Changed1 schema field changedv0.3.2
    • addedInput schema / properties / cc
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "CC addresses. The reply still goes only to the From address of the original message; cc adds recipients in copy.",
      +  "title": "Cc"
      +}
  5. Changed5 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 / attachments
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "File names to attach, as shown by list_knowledge_files. Same rule as send_mail: only files registered in the account identity.",
      +  "title": "Attachments"
      +}
    • addedInput schema / properties / body / description
      Added value: +"Plain-text body of the reply. Only the body: recipient, subject ('Re: ...') and threading are set by GigaMail from the original message."
    • 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 / request_id / description
      Added 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."
  6. First observedv0.1.3

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag this as destructive and non-idempotent, but the description adds substantial context beyond them: preview-before-execution, human approval out of band, request expiration, deduplication, rate limiting, audit logging, and fixed From-address routing. It also explicitly states that execution is irreversible once sent, which is exactly the behavioral disclosure an agent needs for a high-risk mutation.

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?

The description is dense but well organized, with the two-phase approval model front-loaded and fixed addressing and execution results following in a logical order. Some request_id details are repeated nearly verbatim from the schema, which keeps it from being maximally concise.

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 complex, destructive, human-approved mutation with no output schema, the description covers the full lifecycle: preview, approval, execution, expiration, rate limits, audit logging, and the return shape. Nothing an agent needs in order 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 input schema already documents all seven parameters in detail. The description still adds meaning by explaining the request_id two-phase cycle and the cc fixed-addressing constraint, though much of that is also present in the schema descriptions.

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: 'Reply to an existing message in its thread.' This clearly distinguishes it from send_mail and other siblings, and the rest of the description sharpens the scope with fixed addressing and threading behavior.

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 precise instructions for the two-phase flow: call without request_id first, then call again with the returned request_id after out-of-band approval. It does not explicitly say when to choose send_mail versus reply_mail, but the 'existing message in its thread' framing makes the boundary clear enough.

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