Skip to main content
Glama
Sendmux

Sendmux Email Inbox API + Sending

Official
by Sendmux

Batch Delete Messages

mailbox_batch_delete_messages
Destructive

Delete multiple messages from a mailbox at once. Choose whether to move them to Trash or permanently delete, with optional state protection for safe updates.

Instructions

Use this only when the user explicitly asks to delete messages and supplies or confirms the message IDs. Deletion is a mailbox mutation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsNoMessage IDs to delete, maximum 100.
permanentNoWhen true, permanently deletes instead of moving to Trash.
mailbox_idNoMailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
if_in_stateNoOptional message state token for stale-write protection.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.0.8
    • addedOutput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / properties
      Added value: +{
      +  "result": {
      +    "allOf": [
      +      {
      +        "properties": {
      +          "meta": {
      +            "additionalProperties": {},
      +            "properties": {},
      +            "type": "object"
      +          },
      +          "ok": {
      +            "enum": [
      +              true
      +            ],
      +            "type": "boolean"
      +          }
      +        },
      +        "required": [
      +          "ok",
      +          "meta"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "properties": {
      +          "data": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "deleted": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "failed": {
      +                "items": {
      +                  "additionalProperties": false,
      +                  "properties": {
      +                    "code": {
      +                      "type": "string"
      +                    },
      +                    "id": {
      +                      "type": "string"
      +                    },
      +                    "message": {
      +                      "type": "string"
      +                    }
      +                  },
      +                  "required": [
      +                    "id",
      +                    "code",
      +                    "message"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "not_found": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "states": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "new_state": {
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  },
      +                  "old_state": {
      +                    "type": [
      +                      "string",
      +                      "null"
      +                    ]
      +                  }
      +                },
      +                "required": [
      +                  "old_state",
      +                  "new_state"
      +                ],
      +                "type": "object"
      +              }
      +            },
      +            "required": [
      +              "deleted",
      +              "not_found",
      +              "failed",
      +              "states"
      +            ],
      +            "type": "object"
      +          },
      +          "meta": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "request_id": {
      +                "example": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "request_id"
      +            ],
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "data"
      +        ],
      +        "type": "object"
      +      }
      +    ],
      +    "unevaluatedProperties": {
      +      "not": {}
      +    },
      +    "x-fastmcp-top-level-schema": "MailboxBatchDeleteMessagesResultResponse"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "result"
      +]
  2. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description's 'Deletion is a mailbox mutation' mostly restates the structured data. It does add the useful safety context that explicit user request and ID confirmation are required, but it does not describe effects like permanence or recovery beyond what the parameter schema already offers.

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?

Two sentences, no filler, with the most important usage constraint front-loaded. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive batch operation, the description plus annotations and fully documented parameters give an agent enough to select and invoke the tool correctly. The output schema exists, so return-value details are covered elsewhere. A small extra note about default trash vs permanent behavior would be nice, but the schema already specifies it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the description adds no parameter-level detail. Per the rubric baseline, the schema carries the semantic weight, so a 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly conveys that the tool deletes messages, and ties it to user-supplied or confirmed message IDs. It does not explicitly contrast with sibling batch tools, but 'deletion' is specific enough to distinguish it from batch_get or batch_update.

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?

The opening 'Use this only when the user explicitly asks to delete messages and supplies or confirms the message IDs' provides an explicit precondition and a clear exclusion signal. It does not name alternatives, but the 'only when' phrasing effectively constrains when the tool should be selected.

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