Skip to main content
Glama

Rescue emails from junk

not_junk
Destructive

Take messages back out of the junk folder and return them to the inbox - what "not spam" does in a mail client, and the reverse of mark_junk. THERE IS NO SOURCE FOLDER TO PASS: this always reads out of the junk folder, because that is the only place a message it can act on is. Get the uids from list_emails or search_emails against the junk folder first, and remember a uid only means something in the folder it came from. Pass to to send them somewhere other than the inbox - and refuses a to that is the junk folder itself, because that would put them straight back. REFUSES on a mailbox that has no junk folder rather than creating an empty one. Flags and the original dates are preserved, so a rescued message keeps the date it arrived rather than looking like it came in today. Pass every UID in one call rather than calling it once per message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoWhere to put them. Defaults to INBOX, which is what "not spam" means.
uidsYesThe UIDs to act on, from list_emails, search_emails or select_emails. Pass EVERY message you want changed in ONE call - this tool acts on the whole set in a single operation, and doing it that way costs the user one call instead of one per message. Up to 500 at a time. A single message is simply a one-element array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / uids / description
      Previous value: -"The UIDs to act on, from list_emails or search_emails. Pass EVERY message you want changed in ONE call - this tool acts on the whole set in a single operation, and doing it that way costs the user one call instead of one per message. Up to 500 at a time. A single message is simply a one-element array."New value: +"The UIDs to act on, from list_emails, search_emails or select_emails. Pass EVERY message you want changed in ONE call - this tool acts on the whole set in a single operation, and doing it that way costs the user one call instead of one per message. Up to 500 at a time. A single message is simply a one-element array."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the generic profile (destructive true, idempotent false, openWorld true); the description supplies the real behavioral context: there is no source-folder parameter, a `to` pointing at junk is refused, a mailbox with no junk folder is refused rather than having one created, and flags and original arrival dates are preserved. This is precisely the beyond-annotation detail that prevents misuse.

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 core action and the single most important constraint (no source folder) before the operational details. It is dense and mostly earns its length, though the batch-in-one-call guidance and the 'uid only means something in its folder' point are each stated more than once across description and 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 prerequisites, error/refusal cases, side effects on message metadata, and the cost trade-off of batching. An agent has everything needed to invoke it correctly on the first try.

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, but the description adds meaning the schema lacks: the `to` parameter's refusal condition ('refuses a `to` that is the junk folder itself') and why INBOX is the default ('that is what "not spam" means'). It also reframes `uids` as a folder-scoped batch, which is more than the schema states.

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 ('take messages back out of the junk folder and return them to the inbox') and anchors it against a named sibling by calling itself 'the reverse of mark_junk'. An agent can distinguish it from mark_junk, move_email and delete_email without opening any schema.

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?

Gives explicit prerequisites ('get the uids from list_emails or search_emails against the junk folder first'), the batching rule ('pass every UID in one call rather than calling it once per message'), and a conditional alternative path via `to`. The warning that 'a uid only means something in the folder it came from' is exactly the precondition an agent needs.

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