Skip to main content
Glama

Gmail Manage Labels

gmail_manage_labels
Destructive

Create, rename, recolor, or delete Gmail user labels to organize mail. Use it to set up label structure and visibility; apply labels to messages separately.

Instructions

Create, update or delete a Gmail user label. To put labels on mail or take them off use gmail_modify_messages, and to see existing labels gmail_list_labels. Returns status 'ok' and action with label (id, name, type, message_list_visibility, label_list_visibility, background_color, text_color) for create and update, or label_id for delete; status 'cancelled' if the user declines a delete. Deleting asks the user to confirm and cannot be undone; Gmail removes the label from every message, but the messages are kept.

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": {
      "action": "<action>"
    },
    "name": "gmail_manage_labels"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoLabel name to create, or the new name for update; a '/' nests it under a parent, e.g. 'Clients/Acme'. Must differ from every existing label.
labelNoFor update and delete: the label's name as shown in Gmail or its ID (Label_...); an unknown or ambiguous name fails with not_found and the candidates. Not used by create.
actionYes'create' adds a user label (needs name); 'update' renames it or changes its visibility or color (needs label; omitted fields keep their values); 'delete' removes it after the user confirms.
text_colorNoText color as a hex value from Gmail's label palette, e.g. '#ffffff'; set it together with background_color.
background_colorNoBackground color as a hex value from Gmail's label palette, e.g. '#fb4c2f'; set it together with text_color.
label_list_visibilityNoWhether the label appears in Gmail's label list always, only when it has unread mail, or never.
message_list_visibilityNoWhether messages with this label show it in the message list ('show') or not ('hide').

Output Schema

NameRequiredDescriptionDefault
labelNoGmail label.
actionNo
statusNoMachine-readable operation status.
label_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, openWorldHint=true), the description discloses that delete prompts the user for confirmation, cannot be undone, strips the label from every message while keeping the messages, and can return status 'cancelled' if the user declines. This is exactly the mutation context annotations alone cannot convey.

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-loaded with the purpose and alternatives, and every sentence carries operational meaning. The detailed enumeration of returned label fields is somewhat redundant since an output schema exists, which keeps this from a 5.

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?

For a 7-parameter mutation tool with destructive semantics, the description covers purpose, alternatives, confirmation behavior, irreversibility, side effects, and outcome states. With an output schema present, the return-value explanation is a bonus rather than a gap-filler.

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 coverage is 100% and the schema already documents each field, including enum meanings and the name-vs-ID behavior of 'label'. The description adds essentially no syntax or format detail beyond that, so the baseline 3 is appropriate.

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?

Opens with a specific verb triple and resource: 'Create, update or delete a Gmail user label.' It also distinguishes the tool from adjacent capabilities by naming gmail_modify_messages and gmail_list_labels, so an agent can route correctly without inspecting sibling schemas.

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

Usage Guidelines5/5

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

Explicitly states the boundaries: applying/removing labels belongs to gmail_modify_messages and browsing existing labels belongs to gmail_list_labels. The action enum semantics ('create' adds, 'update' renames/changes visibility or color, 'delete' removes after confirmation) further pin down when each mode applies.

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

Deploy Server

Other Tools