Skip to main content
Glama

delete_label

Remove unwanted labels from Gmail messages to organize your inbox by deleting specific label identifiers.

Instructions

Delete a label

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe ID of the label to delete

Implementation Reference

  • Handler function that executes the deletion of a Gmail label by its ID using the Gmail API.
    async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.labels.delete({ userId: 'me', id: params.id }) return formatResponse(data) }) }
  • Zod input schema for the delete_label tool, requiring the label ID as a string.
    { id: z.string().describe("The ID of the label to delete") },
  • src/index.ts:441-452 (registration)
    MCP server tool registration for 'delete_label', including description, schema, and handler.
    server.tool("delete_label", "Delete a label", { id: z.string().describe("The ID of the label to delete") }, async (params) => { return handleTool(config, async (gmail: gmail_v1.Gmail) => { const { data } = await gmail.users.labels.delete({ userId: 'me', id: params.id }) return formatResponse(data) }) } )

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/nk900600/gmail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server