Skip to main content
Glama

delete_message

Permanently delete a Gmail message by providing its ID. Removes the message immediately without moving to trash.

Instructions

Immediately and permanently delete a message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the message to delete

Implementation Reference

  • src/index.ts:562-573 (registration)
    Registration of the 'delete_message' tool via server.tool(), including its schema (id: z.string()) and the handler that calls gmail.users.messages.delete().
    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)
        })
      }
    )
  • Handler function for the 'delete_message' tool - immediately and permanently deletes a message by ID using gmail.users.messages.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)
      })
  • Input schema for the 'delete_message' tool, requiring a single string parameter 'id' (the ID of the message to delete).
    {
      id: z.string().describe("The ID of the message to delete")
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.

Install Server

Other Tools

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/shinzo-labs/gmail-mcp'

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