Skip to main content
Glama
gmail-mcp

gmail-mcp

gmail_manage_labels

Add or remove labels from an email by message ID to organize, archive, mark read or unread, star, or flag it.

Instructions

Add or remove labels from an email.

Args: message_id: The ID of the message to modify add_labels: Comma-separated labels to add (e.g., "STARRED,IMPORTANT" or "Work,Urgent") remove_labels: Comma-separated labels to remove (e.g., "INBOX,UNREAD")

Common labels: - STARRED: Star the message - IMPORTANT: Mark as important - UNREAD: Mark as unread (remove to mark as read) - INBOX: In inbox (remove to archive) - TRASH: In trash - SPAM: In spam

Discovery: use gmail_list_inbox or gmail_search_email first to find the message_id, and gmail_list_labels to verify custom label names.

Sibling tools: use gmail_manage_labels_bulk for multiple messages.

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

Input Schema

NameRequiredDescriptionDefault
add_labelsNo
message_idYes
remove_labelsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it delivers real behavioral meaning that the schema cannot: label removals map to state changes (removing INBOX archives, removing UNREAD marks as read). It does not cover error behavior (invalid label vs invalid message_id) or whether add/remove of the same label is a conflict, which keeps it below 5.

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

Conciseness5/5

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

Front-loaded one-line purpose, then args, then label glossary, then discovery and sibling notes. Each block is labeled and every entry in the label list adds semantics rather than restating a field name.

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

Completeness4/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 not be described, and the remaining agent-facing gaps (discovery path, label vocabulary, bulk alternative) are all covered. Only edge cases such as invalid label names or conflicting add/remove of one label are unaddressed.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: all three parameters are explained, including the comma-separated format with worked examples ("STARRED,IMPORTANT", "INBOX,UNREAD") and the meaning of each common label value.

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 pair and resource: "Add or remove labels from an email." It also explicitly separates itself from the bulk sibling, so the agent knows this is the single-message variant without consulting another schema.

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?

Gives an explicit prerequisite workflow (find message_id via gmail_list_inbox or gmail_search_email, verify custom names via gmail_list_labels) and names the alternative for multi-message work (gmail_manage_labels_bulk). Both when-to-use and which-alternative are spelled out.

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