Skip to main content
Glama

delete_message

Destructive

Delete a specific email message after a human approves the request. First call previews the action and returns a request ID; after out-of-band approval, second call executes the deletion.

Instructions

Delete one message. 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 subject and sender. On execution the message is moved to the provider's Deleted Items / marked deleted and expunged (IMAP); GigaMail never empties the trash. Returns {success}. For reversible tidying prefer move_message, which needs no approval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoFolder of the message (IMAP only; empty = search).
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). Then call again with the same request_id to execute. The agent cannot approve; repeating the call without approval just returns awaiting_approval.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 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 / description
      Added value: +"Folder of the message (IMAP only; empty = search)."
    • 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."
  2. First observedv0.1.3

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description adds substantial context: two-phase approval with preview, audit logging, request expiry, deduplication, rate limits, the exact execution behavior (moved to Deleted Items / expunged), and that GigaMail never empties the trash. This goes far beyond the structured hints and gives an agent full visibility into side effects.

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?

Every sentence earns its place. The key constraint (two-phase, human-approved) is front-loaded immediately after the one-line purpose. Subsequent sentences cover expiry, deduplication, rate limiting, audit log, preview content, execution semantics, trash behavior, return value, and the alternative tool — all without fluff. It is dense but efficient.

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 destructive tool with no output schema, the description fully covers what the agent needs: the approval flow, all possible statuses, parameter semantics, return value, and post-execution effects. It even clarifies edge cases like deduplication and rate limiting. There are no missing pieces an agent would need to call 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 100%, so the baseline is 3, but the description enriches each parameter: it explains the message_id format per account type, the account_id default behavior, and the request_id two-phase lifecycle (omit → approval_required, then pass to execute). This adds meaning beyond the schema's own descriptions, so a 4 is warranted.

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 'Delete one message.' — a specific verb and resource — and immediately distinguishes itself from move_message by recommending it for reversible tidying. This clearly separates the tool from siblings like delete_folder and move_message, so an agent can pick it correctly without ambiguity.

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?

Explicitly states when to use the tool (permanent deletion) and when to prefer the alternative ('For reversible tidying prefer move_message'). It also outlines the mandatory two-phase human-approval flow, telling the agent exactly what the first and second calls do and that the agent cannot approve. No inference needed.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adecubed/gigamail'

If you have feedback or need assistance with the MCP directory API, please join our Discord server