Skip to main content
Glama

AIsa Agent Mail

Update Message Labels

patch_agentmail_inbox_message
Destructive

Adds or removes labels on one message and returns message_id with the resulting labels. Labels are the only mutable part of a received 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. Read the current labels with get_agentmail_inbox_message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inbox_idYesThe ID of the inbox.
add_labelsNoLabel or labels to add to message.
message_idYesID of message.
AuthorizationYesBearer authentication
remove_labelsNoLabel or labels to remove from message.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint and openWorldHint, and the description adds meaningful context about the shared AgentMail workspace: writes affect inboxes other callers created and are visible/editable to future callers. It also clarifies that only labels are mutable and describes the return payload. No contradiction with annotations is present.

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?

The description is three sentences with no filler. It front-loads the operation and result, then adds the shared-workspace warning, then provides a read alternative. Every sentence contributes necessary information.

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 purpose, return value, shared-workspace side effects, and the read alternative, and the output schema handles return details. The main gap is that neither the schema nor the description states that at least one of add_labels or remove_labels must be provided for the call to be meaningful.

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 parameters. The description adds that the operation applies to 'one message' and that labels are the mutable field, but it does not explain the relationship or precondition between add_labels and remove_labels beyond what the schema provides. A 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?

The description clearly states the specific action ('Adds or removes labels on one message') and the resource ('labels' on a message), and explicitly mentions the return value. It also distinguishes this tool from sibling patch tools by noting that labels are the only mutable part of a received message.

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 provides clear context for when to use the tool: modifying labels on a received message. It also points to get_agentmail_inbox_message for reading current labels and notes that labels are the only mutable part, implying other mutation tools handle other resources. However, it does not explicitly enumerate alternative patch tools for drafts or threads.

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