Skip to main content
Glama

Cooper Email

Update thread labels

cooper_update_thread
Idempotent

Use this when every message in a conversation should gain or lose the same labels, including marking the thread read. Requires auth. Works on a paused inbox. Inputs: inbox_id (required; inbox id, username, or email), thread_id (required), add_labels (optional strings), remove_labels (optional strings). The change is applied to every message in the thread. read and unread can be changed. Other system labels (inbox, sent, untrusted, auth_failed, owner, and SPF/DKIM/DMARC results) cannot. Returns the thread plus messages_updated. Unknown thread returns HTTP 404 thread_not_found. Invalid labels return invalid_label, protected_label, or label_conflict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inbox_idYesInbox id (inb_…), username, or full email address owned by this key
thread_idYesThread id (thr_…) whose messages should change labels
add_labelsNoLabels to add on every message. read and unread are allowed. System labels are not.
remove_labelsNoLabels to remove from every message. Pass ["unread"] to mark the thread read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, idempotent=true, destructive=false) by disclosing auth requirements, that it works on a paused inbox, that the change fans out to every message, which labels are mutable (read/unread) versus protected system labels, the return shape, and specific error codes. This is rich behavioral context an agent cannot get from structured fields alone.

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?

Front-loaded with the usage condition, then tightly packed constraints and error codes in a compact list-like form. There is some redundancy with the schema in the 'Inputs:' enumeration, but overall the sentences earn their place.

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 compensates by naming the return value (thread plus messages_updated) and the failure modes (404 thread_not_found; invalid_label, protected_label, label_conflict). Auth, mutation scope, and protected-label behavior are all covered, leaving nothing critical for correct invocation unstated.

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 documents all four parameters, including that inbox_id accepts id/username/email and that remove_labels ["unread"] marks read. The description largely restates this, adding only the note that read and unread are changeable and other system labels are not — baseline 3 is appropriate.

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 ('every message in a conversation should gain or lose the same labels') and scopes it to the whole thread, which cleanly separates it from cooper_update_message and cooper_update_messages. The thread-level semantics are explicit rather than inferred.

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?

Gives a clear triggering condition ('when every message in a conversation should gain or lose the same labels') and adds operational context (requires auth, works on a paused inbox). It does not explicitly name the single-message alternative, but the thread-vs-message framing makes the boundary inferable.

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.

Resources