Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYesThe 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) }) }
  • 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) }) }
  • 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") },

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