Skip to main content
Glama

organize_messages

Destructive

Organize Gmail threads in bulk: archive (remove from Inbox), trash (move to Trash — RECOVERABLE, this is not a permanent delete), mark_read, mark_unread, star, unstar, add_label, remove_label, mark_spam (report as spam — also removes from Inbox), unmark_spam (not spam — restores to Inbox). Pass thread ids from search_messages results together with the account each belongs to; a batch may span several connected accounts and is capped at 50. add_label/remove_label take a label NAME — add_label creates it on that account if missing, remove_label never creates one. One item failing never aborts the rest: every item comes back with ok/error, and a missing-permission failure is flagged reconnect so you can tell the user to reconnect that account rather than showing a generic error. This CHANGES the user's mailbox — confirm the threads and the action with them before calling. Needs gmail.modify (reconnect on a permission error).

Input Schema

NameRequiredDescriptionDefault
itemsYesThreads to act on — up to 50 per call. A batch may span several accounts.
labelNoLabel NAME (not id) — required for add_label/remove_label, ignored otherwise. add_label creates the label on that account when it has none by that name; remove_label never creates one and fails just that item if the name does not exist.
actionYesWhat to do with every thread in `items`: archive (remove from Inbox), trash (move to Trash — recoverable, NOT a permanent delete), mark_read, mark_unread, star, unstar, add_label, remove_label, mark_spam (report as spam — also removes from Inbox), unmark_spam (not spam — restores to Inbox).

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 give only destructiveHint=true, but the description adds substantial behavior beyond that: trash is recoverable and not a permanent delete, add_label creates a missing label while remove_label never does, partial failures return ok/error per item, and permission failures surface a `reconnect` flag. It also discloses the mailbox-mutating nature and the confirmation requirement.

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?

Dense and front-loaded, with the destructive/confirm constraint placed ahead of the permission note where it matters most. The opening action enumeration somewhat duplicates the enum's own descriptions, which is minor redundancy but keeps the agent from needing to scan the schema.

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 mutation tool with no output schema, the description covers the missing pieces: per-item result shape (ok/error), the reconnect failure mode, the batch cap, cross-account items, and the auth scope. Nothing essential for correct invocation is left 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 description's action list and label-name semantics largely restate what the schema already documents. It lightly reinforces cross-account batching and label-NAME behavior, but adds little the schema doesn't already carry, so the baseline 3 applies.

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?

Opens with a specific verb+resource ('Organize Gmail threads in bulk') and enumerates every supported action, making it immediately distinguishable from single-message siblings like trash_message or modify_thread_labels. An agent knows exactly what this tool is for and its bulk scope.

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?

Explicitly routes the agent to search_messages for thread ids and to list_accounts for account labels, and mandates confirming with the user before calling. It also flags the gmail.modify requirement and the 50-item batch cap. It does not, however, contrast itself against near neighbors like trash_message or modify_thread_labels, so the agent must infer that routing.

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