Skip to main content
Glama

label_messages

Add label IDs to specific Gmail messages in an account, targeting message IDs only rather than whole threads. Use IDs from get_labels; results are verified.

Instructions

Add one or more labels to specific MESSAGES in one account. Message-level only — a Gmail thread id usually equals the id of the thread's first message, so passing a thread id here labels just that one message; use label_thread to label the whole conversation. label_ids must be label IDs from get_labels for this same account (e.g. "Label_5459..." or a system label such as STARRED/IMPORTANT), not display names. Every id is read back afterwards, so the response reports the verified count and names any id that does not exist.

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": {
      "account": "<account>",
      "message_ids": "<message_ids>",
      "label_ids": "<label_ids>"
    },
    "name": "label_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountYesAccount id ("personal", "tamu").
label_idsYesLabel IDs (from get_labels) to add. Not display names.
message_idsYesGmail message ids to update.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only say readOnly=false and destructive=false, so the description carries the real burden and delivers: it discloses that every id is read back afterwards and that the response reports a verified count plus any nonexistent ids, which is post-call behavior an agent cannot infer. It stops short of stating permission requirements, duplicate-label behavior, or whether failures are partial.

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-loads the action, then the sibling boundary, then the id-format constraint, then the verification result. Every sentence carries a distinct fact — scope, alternative, input format, response — with no restatement of the name or filler.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Three required flat parameters, no output schema, and thin annotations — all the risk sits in id semantics and response interpretation, and the description addresses both, including what the response looks like. An agent has enough to call it correctly on the first attempt.

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?

Schema coverage is 100%, so the baseline is 3; the schema already documents account, message_ids, and label_ids including 'Not display names.' The description repeats the label_ids constraint and adds only the thread-id-equals-message-id nuance, which is helpful but largely covered by the schema's 'Gmail message ids to update.'

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 and resource with scope: 'Add one or more labels to specific MESSAGES in one account.' It immediately differentiates from the sibling label_thread by declaring itself 'Message-level only', so an agent can route correctly without opening either 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 when-to-use-this-vs-alternative rule: use label_thread to label a whole conversation. It also warns that a Gmail thread id usually equals the first message's id, so passing a thread id here labels only one message — a genuine misuse trap that alternatives alone would not resolve.

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