Skip to main content
Glama

delete_mailbox

DestructiveIdempotent

Remove a mailbox (soft delete). Required: mailbox_id. By DEFAULT the already-fetched mails are KEPT and stay readable via list_emails/get_email — they belong to the tenant, not to the connection they arrived through; their triage state and links to leads and drafts stay. The mailbox is marked removed and no longer syncs or appears in list_mailboxes. The answer reports kept_emails. Pass delete_emails=true to ALSO delete every already-fetched mail of this mailbox (irreversible) — only then is anything deleted. Refuses while the mailbox is the default sender unless force=true, because removing it silently sends the next unmatched mail through the shared address.

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": {
      "mailbox_id": "<mailbox_id>"
    },
    "name": "delete_mailbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoRemove even if the mailbox is the default sender
mailbox_idYesID of the mailbox to delete
delete_emailsNoAlso delete all fetched mails of this mailbox (irreversible)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / delete_emails / description
      Added value: +"Also delete all fetched mails of this mailbox (irreversible)"
    • addedInput schema / properties / force / description
      Added value: +"Remove even if the mailbox is the default sender"
    • addedInput schema / properties / mailbox_id / description
      Added value: +"ID of the mailbox to delete"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing exactly what survives (already-fetched mail, triage state, lead and draft links), what is destroyed only under delete_emails=true, what becomes unavailable (sync and list_mailboxes visibility), the refusal guard with its rationale, and the kept_emails field in the response. This is close to exemplary, but the description never states permission requirements or how partially-processed failures behave.

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?

Front-loaded with the operation and its default, then the destructive opt-in, then the guard — a logical order for an agent scanning it. It is a dense single block with some redundancy ('only then is anything deleted' restates the irreversibility point), but almost every clause carries decision-relevant information.

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?

With three parameters, no nested objects, and no output schema, the definition covers everything needed: defaults, destructive opt-in, precondition, side effects on related records, and even the returned kept_emails signal. An agent can call this correctly and understand the blast radius without further inference.

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; the description earns extra by giving the default state of delete_emails and the precise triggering condition and consequence of force (default sender, silent fallback to the shared address). It largely restates the schema wording for the other two parameters, which caps it below 5.

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 plus an explicit default semantic — 'Remove a mailbox (soft delete)' — so the agent immediately knows this is a mailbox-removal operation that does not delete mail by default. It is clearly distinguishable from sibling data tools like list_emails and get_email, which it names as the read paths.

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 concrete conditional routing: default is a soft removal that keeps mail readable via list_emails/get_email, and delete_emails=true selects the destructive variant. It also documents a precondition (refuses for default sender unless force=true). It stops short of naming an alternative removal tool or a when-not-to-use-this-at-all case, so a 4 rather than a 5.

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.