Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Modify Gmail Message Labels

modify_gmail_message_labels
Destructive

Add or remove Gmail labels to sort, archive, or delete messages. Use INBOX removal to archive and TRASH addition to delete.

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.

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv1.25.2
    • removedInput schema / properties / add_label_ids / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / remove_label_ids / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
  2. Changed17 schema fields changedv1.0.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / add_label_ids / description
      Added value: +"List of label IDs to add to the message."
    • addedInput schema / properties / add_label_ids / items
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / add_label_ids / title
      Removed value: -"Add Label Ids"
    • addedInput schema / properties / add_label_ids / type
      Added value: +"array"
    • addedInput schema / properties / message_id / description
      Added value: +"The ID of the message to modify."
    • removedInput schema / properties / message_id / title
      Removed value: -"Message Id"
    • addedInput schema / properties / remove_label_ids / description
      Added value: +"List of label IDs to remove from the message."
    • addedInput schema / properties / remove_label_ids / items
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / remove_label_ids / title
      Removed value: -"Remove Label Ids"
    • addedInput schema / properties / remove_label_ids / type
      Added value: +"array"
    • removedInput schema / properties / service
      Removed value: -{
      -  "title": "service",
      -  "type": "string"
      -}
    • addedInput schema / properties / user_google_email / description
      Added value: +"The user's Google email address. Required."
    • removedInput schema / properties / user_google_email / title
      Removed value: -"User Google Email"
    • changedInput schema / required
      Previous value: -[
      -  "service",
      -  "user_google_email",
      -  "message_id"
      -]New value: +[
      +  "user_google_email",
      +  "message_id"
      +]
    • removedInput schema / title
      Removed value: -"modify_gmail_message_labelsArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "type": "object",
      +  "x-fastmcp-wrap-result": true
      +}
  3. First observedv1.0.0

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.

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/taylorwilsdon/google_workspace_mcp'

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