Skip to main content
Glama
gmail-mcp
by gchallen

label_message

Adds labels to a Gmail message by ID using label IDs or exact names, including system labels such as STARRED and INBOX. Use trash or spam actions for those states.

Instructions

Add labels to one message. IDs or exact names; system labels too (STARRED, IMPORTANT, INBOX, UNREAD). Use trash_message or mark_message_spam for those states.

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": {
      "messageId": "<messageId>",
      "labelIds": "<labelIds>"
    },
    "name": "label_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelIdsYes
messageIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.9.2

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds some behavioral context by forbidding use for trash/spam states, but says nothing about whether the operation is additive versus replacing existing labels, what happens on duplicate labels, or what is returned.

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?

Three short clauses with no filler; the core action comes first, the value-format detail second, and the exclusion last. Every clause contributes information an agent needs to call it correctly.

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 two-parameter mutation with no output schema and solid annotations, the description covers purpose, label value formats, and key exclusions. The main residual gap is not clarifying the additive semantics or its relationship to the overlapping update_message_labels sibling.

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 description coverage is 0%, so the description must carry parameter meaning, and it does: labelIds accepts IDs or exact names, and system labels like STARRED, IMPORTANT, INBOX and UNREAD are valid values. messageId is left implicit ('one message') but its meaning is unambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Add labels to one message') and pins the scope to a single message, which separates it from thread- and batch-level siblings such as label_thread and batch_modify_messages. It does not explicitly distinguish itself from update_message_labels, which is the nearest ambiguous alternative.

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?

It gives explicit routing guidance by naming the correct tools for two neighboring states ('Use trash_message or mark_message_spam for those states'), which prevents an agent from misusing labels to emulate trash or spam. It stops short of covering when to prefer update_message_labels or a thread-level call.

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