Skip to main content
Glama

AIsa Agent Mail

Update Thread Labels

patch_agentmail_inbox_thread
Destructive

Adds or removes labels on a whole thread and returns thread_id with the resulting labels. Applies to every message in the thread at once; the per-message twin is patch_agentmail_inbox_message. Writes to the shared AgentMail workspace: Every AIsa caller shares one AgentMail account, so this reaches inboxes other callers created, and what you write here is visible and editable by the next caller.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inbox_idYesThe ID of the inbox.
thread_idYesID of thread.
add_labelsNoLabels to add to thread. Cannot be system labels.
AuthorizationYesBearer authentication
remove_labelsNoLabels to remove from thread. Cannot be system labels. Takes priority over `add_labels` (in the event of duplicate labels passed in).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already indicate destructive and open-world behavior, but the description adds high-value context: the shared AgentMail workspace means writes affect other callers' inboxes and are visible/editable by the next caller. It also discloses the resulting labels in the return and that the operation applies thread-wide. This goes well beyond the annotation flags.

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 sentences, each earning its place: the first states action and return, the second clarifies scope and names the alternative, the third warns about shared state. Information is front-loaded and no filler is present.

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?

The description covers the core action, return value, thread-wide scope, the per-message alternative, and the critical shared-workspace side effect. It does not clarify how this tool differs from `patch_agentmail_thread`, which is a similarly named sibling. That minor gap prevents a perfect score.

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 each parameter (add_labels, remove_labels, inbox_id, etc.). The description adds only a general statement about adding/removing labels, not new parameter-level meaning. Baseline of 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?

The description opens with a specific verb-resource pair: 'Adds or removes labels on a whole thread' and immediately states the returned values. It explicitly names the per-message twin `patch_agentmail_inbox_message`, making the scope clear. This distinguishes it from both the per-message patch and other thread operations in the sibling list.

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?

The description clearly says this applies to every message in a thread at once and points to `patch_agentmail_inbox_message` for per-message granularity. However, it does not address the closely named sibling `patch_agentmail_thread`, leaving potential confusion about when to use the inbox-scoped variant versus the non-inbox variant. Context is solid but exclusions are incomplete.

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