Skip to main content
Glama

Empty Mail Folder

email_folder_empty
DestructiveIdempotent

Deletes all messages in a selected mail folder, including Inbox, Junk, or Deleted items, up to a set maximum, leaving subfolders untouched. Runs only after you approve.

Instructions

Delete all messages in one mail folder, such as Junk Email or Deleted Items, up to max_messages per call. Subfolders are kept. Requires confirm=true after the user approves. Deleted messages cannot be restored with these tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmYesMust be true to delete every message in this folder; set only after the user approves.
folder_idYesMail folder ID, or one of the aliases inbox, sent, drafts, deleted, junk, archive.
account_idNoAccount ID or email address. Omit when only one account is signed in.
max_messagesNoMost messages to delete in this call.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
deletedYes
summaryYesOne-line human summary. The tool's text content is this result serialized as JSON (summary included), so a client that ignores structuredContent still sees every field.
folder_idYes
remainingYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, but the description adds critical nuance they do not carry: the deletion is irreversible ('Deleted messages cannot be restored with these tools'), subfolders survive the operation, and the action is chunked ('up to max_messages per call'), meaning a single call may not fully empty a large folder. These are exactly the traits that change how an agent sequences the call.

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, zero filler, front-loaded with the action and scope, followed by the destructive caveats. Every clause carries distinct information.

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?

With an output schema present, return values need not be described. The description covers the safety profile, the confirm workflow, the batching limit, and the irreversibility, which is everything an agent needs before invoking a destructive bulk operation.

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 interpretation: 'up to max_messages per call' signals the parameter is a batch cap rather than a total, and the confirm sentence explains the approval gating the schema only states mechanically.

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 ('Delete all messages in one mail folder') with illustrative scope ('such as Junk Email or Deleted Items') and a key boundary ('Subfolders are kept'). An agent can distinguish this folder-level bulk purge from single-message deletion siblings without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an operational precondition ('Requires confirm=true after the user approves') that implies a human-in-the-loop approval flow, which is useful routing context. However, it never contrasts this tool with the message-level delete path or states when emptying a folder is preferable to deleting individual messages.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.