Skip to main content
Glama

delete_message

Permanently delete a Gmail message using its ID to remove unwanted emails and manage your inbox.

Instructions

Immediately and permanently delete a message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the message to delete

Implementation Reference

  • Handler function for 'delete_message' tool: permanently deletes a Gmail message by its ID using the Gmail API (gmail.users.messages.delete). Includes schema validation for the 'id' parameter.
    server.tool("delete_message",
      "Immediately and permanently delete a message",
      {
        id: z.string().describe("The ID of the message to delete")
      },
      async (params) => {
        return handleTool(config, async (gmail: gmail_v1.Gmail) => {
          const { data } = await gmail.users.messages.delete({ userId: 'me', id: params.id })
          return formatResponse(data)
        })
      }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Without annotations, the description carries the full burden. It states the message is deleted immediately and permanently, which are key behavioral traits. However, it does not mention irreversibility or side effects (e.g., cannot be undone), though 'permanent' strongly implies that. For a simple deletion, this is sufficient.

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?

Extremely concise: only five words. No unnecessary details. Every word adds value.

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?

Given the tool's simplicity (one parameter, no output schema), the description is nearly complete. It covers the core functionality and permanence. Missing details like error handling (e.g., message not found) are minor, as such issues are implied by typical API behavior.

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 coverage is 100% for the single parameter 'id', with a clear description. The tool description adds no extra meaning beyond what the schema already provides. Baseline 3 is appropriate.

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 clearly states the action: delete a message immediately and permanently. This distinguishes it from sibling tools like trash_message (which likely soft-deletes) and untrash_message. The purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While the description implies permanence, it does not explicitly state when to use this tool versus alternatives like trash_message. No exclusions or when-not-to-use guidance are provided. It relies on the user inferring that 'permanent' means this is for hard deletion.

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