Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by ChinmayNakwa

Modify Gmail Message Labels

modify_gmail_message_labels
Destructive

Add or remove labels from a Gmail message to archive (remove INBOX) or delete (add TRASH) emails via Google Workspace MCP Server.

Instructions

Adds or removes labels from a Gmail message. To archive an email, remove the INBOX label. To delete an email, add the TRASH label.

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

Input Schema

NameRequiredDescriptionDefault
message_idYesThe ID of the message to modify.
add_label_idsNoList of label IDs to add to the message.
remove_label_idsNoList of label IDs to remove from the message.
user_google_emailYesThe user's Google email address. Required.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.1

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description is not contradicting them. The description adds value by explaining the side effects of specific label choices (removing INBOX archives, adding TRASH deletes), which is meaningful behavioral context beyond the raw annotation. However, it does not mention that changes are immediate, whether label removal can permanently delete messages, or any permissions/user-consent implications. With annotations present, the description's additional behavioral detail earns a 3 rather than lower.

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 concise and front-loaded with the core action. The two example sentences are useful and non-redundant. It could be slightly improved by adding a sentence on label ID format, but the current length is appropriate and every sentence serves a purpose.

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?

For a single-message label modification tool, the description is fairly complete: it states the action, gives the two most important use cases, and annotations cover the destructive nature. The output schema exists (though not shown) which may cover return values. It could have mentioned the relationship to batch_modify_gmail_message_labels and that custom label IDs are allowed, but the essentials are present.

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 input schema covers 100% of parameters with descriptions, so the baseline is 3. The description's examples imply the meaning of add_label_ids and remove_label_ids but do not add technical details like label ID format (e.g., 'INBOX', 'TRASH', custom ID). Since the schema already documents all parameters, the description does not need to compensate for gaps; it just doesn't add much beyond the examples.

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?

The description states a specific action ('Adds or removes labels from a Gmail message') and immediately provides two concrete operational examples (archiving via removing INBOX, deleting via adding TRASH). This clearly distinguishes the tool from siblings like manage_gmail_label (which manages label definitions) and batch_modify_gmail_message_labels (which operates on multiple messages).

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?

The description gives explicit usage context for common operations (archive and delete), which helps the agent understand when to use this tool. However, it does not explicitly mention when to prefer batch_modify_gmail_message_labels over this single-message tool, nor does it state any exclusions for when not to use it. The practical examples imply usage well but leave the single-vs-batch distinction implicit.

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