Skip to main content
Glama

Delete label

delete_label
DestructiveIdempotent

Delete a Gmail label or Outlook category from a mailbox. Gmail messages stay but lose the label, while Outlook messages keep the category name; use list_labels to find the ID.

Instructions

Delete a Gmail label or an Outlook category from a mailbox. In Gmail, the label is removed from its messages, which stay in the mailbox, and a label with nested labels can't be deleted until they are. Gmail system labels such as Inbox and Starred can't be deleted. In Outlook, the category leaves the mailbox's category list, but messages that have it keep its name. Call list_labels first to find the label ID.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "label": "<label>"
    },
    "name": "delete_label"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelYesID of the label or category to delete, as list_labels returns it, or its name.
accountIdNoAccount to operate on. Optional when exactly one account is connected.

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.31.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description goes further by specifying exactly what is destroyed versus preserved: in Gmail messages stay in the mailbox, in Outlook messages keep the category name even after the category is removed from the list. It also enumerates the blocked cases (system labels, labels with children), which is behavior an agent cannot infer from the schema or annotations.

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?

Front-loads purpose, then per-provider semantics, then the list_labels prerequisite. Every sentence carries information, though the prerequisite would be more useful ahead of the edge-case constraints, and the Gmail/Outlook split is delivered as a run-on clause.

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

Completeness5/5

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

An output schema exists, so return values need no explanation, and the annotations cover the safety profile. For a destructive two-parameter tool the description supplies the missing pieces: scope of destruction, provider-specific side effects, and blocking preconditions.

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?

Schema description coverage is 100%, so both parameters are already documented in structured data. The description adds only a small hint that the ID comes from list_labels and may be supplied by name; the optional accountId is not discussed, so this is a baseline score.

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

Purpose5/5

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

States a specific verb and resource ('Delete a Gmail label or an Outlook category from a mailbox') and immediately scopes it to two provider variants. It is clearly distinguishable from remove_labels, since it explains that deleting a label removes it from messages rather than detaching it per-message.

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

Usage Guidelines4/5

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

Gives an explicit prerequisite: 'Call list_labels first to find the label ID,' and states hard preconditions (nested labels must be deleted first, system labels like Inbox/Starred cannot be deleted). It does not explicitly contrast with remove_labels by name, so the when-not guidance is implied rather than enumerated.

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