delete_draft
Delete a specific draft from your Gmail account by providing its ID to remove unsent emails.
Instructions
Delete a draft
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID of the draft to delete |
Implementation Reference
- src/index.ts:298-309 (registration)Registration of the 'delete_draft' tool via server.tool() with schema (id: string) and handler that calls gmail.users.drafts.delete(). The registration, schema, and handler are all co-located in this single block.
server.tool("delete_draft", "Delete a draft", { id: z.string().describe("The ID of the draft to delete") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.drafts.delete({ userId: 'me', id: params.id }) return formatResponse(data) }) } )