Skip to main content
Glama

AIsa Agent Mail

Update Any Thread Labels

patch_agentmail_thread
Destructive

Adds or removes labels on a thread addressed by id alone, returning thread_id and the resulting labels. No inbox is named, so it resolves account-wide. 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. The scoped twin is patch_agentmail_inbox_thread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.8/5.0
Behavior5/5

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

Annotations already indicate destructive/shareworld behavior, but the description adds essential context beyond them: writes reach inboxes created by other callers and are visible/editable by the next caller. This shared-workspace caveat is exactly the kind of behavioral nuance that annotations alone do not communicate.

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?

The three-sentence structure front-loads the core action, then adds scope/warning, then the sibling pointer. It is efficient, though the shared-workspace sentence is a bit long and could be trimmed without losing meaning. Overall it earns its 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?

For a write tool with 4 params, full schema coverage, an output schema, and annotations, the description covers the key behavioral, scoping, and alternative-selection aspects. It doesn't repeat schema details (like system-label restrictions) but conveys all necessary context for correct invocation.

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 adds value by saying the thread is addressed 'by id alone' and that no inbox is named, clarifying that `thread_id` is globally sufficient and there is no inbox parameter. This goes slightly beyond the schema's plain 'ID of thread'.

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: 'Adds or removes labels on a thread addressed by id alone.' It also clearly distinguishes this tool from the scoped twin (`patch_agentmail_inbox_thread`) by stating that it resolves account-wide, so an agent can immediately understand its unique role among siblings.

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?

The description explicitly names the alternative ('The scoped twin is `patch_agentmail_inbox_thread`') and gives the condition for choosing this one: no inbox is named, so it resolves account-wide. This provides a clear when-to-use vs. alternative contrast without requiring extra inference.

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