Skip to main content
Glama

Cooper Email

Update labels on messages

cooper_update_messages
Idempotent

Use this when several stored messages should gain or lose the same labels, including marking a batch read. Requires auth. Works on a paused inbox, because this is triage and not a send. Inputs: inbox_id (required; inbox id, username, or email), message_ids (required; 1 to 50 unique message ids), add_labels (optional strings), remove_labels (optional strings). At least one of add_labels or remove_labels is required. Mark read with remove_labels ["unread"]. You may also add "read". read and unread can be changed. Other system labels (inbox, sent, untrusted, auth_failed, owner, and SPF/DKIM/DMARC results) cannot be added or removed. Ids that are not in this inbox are left out. The messages that are in this inbox all update, or none do. Returns {object:"list", limit, count, data} with full messages in the same order as message_ids. While a message is held, the body stays withheld and the held label is not removed. Empty message_ids is 400 missing_message_ids. Duplicates are 400 duplicate_message_ids. More than 50 ids is 400 too_many_ids. Missing labels is 400 missing_labels. Invalid labels return invalid_label, protected_label, or label_conflict. Another inbox is 404 inbox_not_found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inbox_idYesInbox id (inb_…), username, or full email address owned by this key
add_labelsNoLabels to add on every resolved message. read and unread are allowed. System labels are not.
message_idsYes1 to 50 unique message ids (msg_…). Ids that are not in this inbox are omitted.
remove_labelsNoLabels to remove on every resolved message. Pass ["unread"] to mark them read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly=false, destructive=false, idempotent=true), and the description adds substantial context beyond that: auth requirement, paused-inbox scope, all-or-nothing atomicity, the protected-label set that cannot be modified, and the held-message caveat (body withheld, held label not removed). This is unusually rich behavioral disclosure.

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?

Despite its length, the block is front-loaded (trigger, auth, paused-inbox rationale, inputs) and every subsequent sentence carries a distinct operational fact — constraint, edge case, return shape, or error code. Nothing is redundant 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?

With no output schema, the description supplies the return shape ({object:'list', limit, count, data}, ordered by message_ids) and enumerates the failure modes (400 missing_message_ids, duplicate_message_ids, too_many_ids, missing_labels; invalid_label/protected_label/label_conflict; 404 inbox_not_found). An agent has everything needed to call and interpret it.

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 further by documenting the cross-field constraint 'At least one of add_labels or remove_labels is required' and the mark-read idiom (remove_labels ["unread"]), neither of which is expressible in the schema. The 1-to-50 unique-id rule is repeated from the schema, adding little.

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 opening sentence states a specific verb and resource ('several stored messages should gain or lose the same labels'), immediately distinguishing this batch operation from the singular cooper_update_message sibling. An agent can tell what it does without opening the schema.

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 a clear triggering condition ('Use this when several stored messages should gain or lose the same labels, including marking a batch read') and an important context constraint ('Works on a paused inbox, because this is triage and not a send'). It does not explicitly name cooper_update_message as the single-message alternative, so the routing is implied rather than spelled out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.