delete_filter
Remove unwanted email filters from your Gmail account by specifying the filter ID to clean up your inbox organization rules.
Instructions
Deletes a filter
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID of the filter to be deleted |
Implementation Reference
- src/index.ts:1007-1017 (registration)Registration of the 'delete_filter' tool, including input schema (id parameter) and handler function that calls Gmail API to delete the specified filter.server.tool("delete_filter", "Deletes a filter", { id: z.string().describe("The ID of the filter to be deleted") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.filters.delete({ userId: 'me', id: params.id }) return formatResponse(data) }) }
- src/index.ts:1007-1017 (handler)The handler function for 'delete_filter' tool executes by calling the Gmail filters.delete API with the provided filter ID.server.tool("delete_filter", "Deletes a filter", { id: z.string().describe("The ID of the filter to be deleted") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.settings.filters.delete({ userId: 'me', id: params.id }) return formatResponse(data) }) }
- src/index.ts:1009-1011 (schema)Input schema for delete_filter tool: requires 'id' string parameter for the filter ID.{ id: z.string().describe("The ID of the filter to be deleted") },