Skip to main content
Glama

delete_label

Remove a specific Gmail label using its label ID. Streamline your email organization by cleaning up unused or redundant labels.

Instructions

Delete a Gmail label

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelIdYesLabel ID to delete

Implementation Reference

  • Input schema definition for delete_label tool - requires a labelId string parameter.
    delete_label: z.object({ labelId: z.string().describe("Label ID to delete") }),
  • src/tools.ts:42-42 (registration)
    Description registered for the delete_label tool: 'Delete a Gmail label'.
    delete_label: "Delete a Gmail label",
  • Tool handler case for delete_label - validates input via Zod schema, calls gmailService.deleteLabel(v.labelId), and returns a success message.
    case "delete_label": {
        const v = validated as z.infer<typeof schemas.delete_label>;
        await gmailService.deleteLabel(v.labelId);
        return { content: [{ type: "text", text: `Label ${v.labelId} deleted successfully.` }] };
    }
  • GmailService.deleteLabel() method - executes the Gmail API call to delete a label by ID via users.labels.delete.
    async deleteLabel(id: string): Promise<void> {
        await this.gmail.users.labels.delete({ userId: 'me', id });
    }
  • src/lib.ts:48-48 (registration)
    The tool is registered as an MCP tool via getToolDefinitions() called in the ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: getToolDefinitions() }));
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states 'Delete a Gmail label.' It does not disclose behavioral traits like irreversibility, required permissions, or effects on associated messages.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise (3 words) and front-loaded. It earns its place, though a bit more context (e.g., effect on messages) would not harm conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity (1 param, no output schema), the description is minimally adequate but fails to provide behavioral context that would be expected for a destructive operation, especially without annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'labelId' is fully described in the schema (100% coverage). The tool description adds no additional meaning beyond what the schema provides, meeting the baseline expectation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (delete) and the resource (a Gmail label). It is specific and distinguishes from sibling tools like create_label or list_labels, though no explicit differentiation is provided.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, no prerequisites mentioned, and no mention of consequences such as whether deletion is permanent or reversible.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/muammar-yacoob/GMail-Manager-MCP'

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