batch_delete_messages
Delete multiple emails by supplying their IDs. Remove unnecessary messages from your inbox.
Instructions
Delete multiple messages
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | The IDs of the messages to delete |
Implementation Reference
- src/index.ts:534-545 (registration)Tool registration for 'batch_delete_messages' using server.tool() with Zod schema for parameter validation.
server.tool("batch_delete_messages", "Delete multiple messages", { ids: z.array(z.string()).describe("The IDs of the messages to delete") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.messages.batchDelete({ userId: 'me', requestBody: { ids: params.ids } }) return formatResponse(data) }) } ) - src/index.ts:539-545 (handler)Handler implementation: calls gmail.users.messages.batchDelete with the provided message IDs.
async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.messages.batchDelete({ userId: 'me', requestBody: { ids: params.ids } }) return formatResponse(data) }) } ) - src/index.ts:536-538 (schema)Input schema: requires an 'ids' parameter as an array of strings describing message IDs to delete.
{ ids: z.array(z.string()).describe("The IDs of the messages to delete") },