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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The 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) }) } ) - src/index.ts:567-571 (handler)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) }) - src/index.ts:564-565 (schema)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")