Skip to main content
Glama

Modify Gmail Message Labels

modify_gmail_message_labels
Destructive

Add or remove Gmail labels on a message to organize your inbox. Archive by removing the INBOX label, or delete by adding the TRASH label.

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
Install Server

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark this as destructive and non-read-only, and the description adds meaningful behavioral detail: removing INBOX achieves archiving, adding TRASH achieves deletion. These are side-effect semantics not visible in the schema and not covered by the annotations, so the description provides real additional value without contradicting the annotations.

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?

The description is three short sentences with no repetition or filler. The core purpose is front-loaded, and the two additional sentences each carry concrete, non-obvious usage information.

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?

With 100% schema coverage, annotations, and an output schema, the description covers the essential special-label behavior and destructive implications. It is slightly incomplete in not mentioning that multi-message operations could use batch_modify_gmail_message_labels, but this is a modest gap rather than a serious omission.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description goes beyond the schema by naming concrete label IDs (INBOX, TRASH) and mapping them to high-level intents, which helps an agent populate add_label_ids and remove_label_ids meaningfully.

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 starts with a specific verb and resource: 'Adds or removes labels from a Gmail message.' This clearly distinguishes the tool from label-management siblings like manage_gmail_label and gives concrete meaning to the operation. The archive/delete examples further clarify the purpose.

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

Usage Guidelines3/5

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

The description gives practical usage clues: 'To archive an email, remove the INBOX label' and 'To delete an email, add the TRASH label.' However, it never explicitly tells the agent when to choose this tool over the sibling batch_modify_gmail_message_labels or how it differs from manage_gmail_label. The usage guidance is useful but implied rather than explicit.

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

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

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