Skip to main content
Glama

Add labels

add_labels
Idempotent

Assign Gmail labels or Outlook categories to selected messages by ID, helping organize and group mail across connected accounts.

Instructions

Add labels, or Outlook categories, to messages.

Input Schema

NameRequiredDescriptionDefault
labelsYesGmail labels or Outlook categories
accountIdNoAccount to operate on. Optional when exactly one account is connected.
messageIdsYesMessages to change, up to 100 IDs

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.19.0
    • changedInput schema / properties / accountId / anyOf
      Previous value: -[
      -  {
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 512,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / labels / items / maxLength
      Added value: +512
    • changedInput schema / properties / messageIds / description
      Previous value: -"Messages to change, up to 100 distinct IDs"New value: +"Messages to change, up to 100 IDs"
    • addedInput schema / properties / messageIds / items / maxLength
      Added value: +512
    • addedInput schema / properties / messageIds / maxItems
      Added value: +100
  2. Addedv0.16.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare the mutation profile (readOnlyHint=false, idempotentHint=true, destructiveHint=false), so the bar is lower. The description adds genuine domain context by clarifying that "labels" means Gmail labels or Outlook categories, but says nothing about what happens if a label doesn't exist, whether duplicates are ignored, or partial-failure behavior across the ID batch.

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?

One tight sentence with the action front-loaded and no filler. Nothing is wasted, though the brevity borders on under-specification for a mutation tool.

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

Completeness3/5

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

The output schema, complete parameter coverage, and annotations carry most of the load, so the thin description is workable. What's still missing is any hint about label pre-existence or error handling on a batch mutation, which an agent would want before calling.

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 description coverage is 100%, so the schema already explains messageIds (up to 100 IDs), accountId (optional with one account), and labels. The description's only addition is the provider-specific meaning of labels, which is a marginal gain; baseline 3 applies.

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?

States a specific verb ("Add") and resource ("labels/Outlook categories") applied to messages, which cleanly separates it from remove_labels and list_labels without needing to name them. It is clear but stops short of any explicit sibling differentiation.

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?

Usage is only implied by the verb: the agent can infer this is the additive counterpart to remove_labels, but there is no statement of when to prefer it, no prerequisite that labels must already exist (no create-label path is mentioned), and no note about batch limits beyond the schema.

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