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)
        })
      }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds value by specifying 'immediately and permanently', which implies irreversibility and urgency beyond just 'delete'. However, it doesn't cover other behavioral aspects like permissions needed, error conditions, or rate limits, leaving gaps for a destructive operation.

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?

The description is a single, efficient sentence with zero waste—every word contributes to understanding the tool's purpose and behavior. It's front-loaded with the core action and appropriately sized for a simple tool.

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

Completeness3/5

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

Given the tool's complexity (simple deletion with one parameter), no annotations, and no output schema, the description is moderately complete. It covers the destructive nature but lacks details on prerequisites, error handling, or return values. For a mutation tool with no structured safety hints, it should do more to guide safe usage.

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%, with the single parameter 'id' fully documented in the schema. The description doesn't add any parameter-specific details beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when the schema handles parameter documentation adequately.

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'), the resource ('a message'), and specifies the manner ('immediately and permanently'), which distinguishes it from siblings like 'trash_message' or 'batch_delete_messages'. It uses specific verbs and provides scope that differentiates it from alternatives.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'trash_message' (which might be reversible) or 'batch_delete_messages' (for multiple deletions). It lacks explicit when/when-not instructions or named alternatives, offering only basic functional context.

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

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