Skip to main content
Glama

bulk_manage_messages

Bulk-manage messages in any folder: scan with client-side filtering, then perform dry-run, delete, move, or mark-read actions. Supports limit, folder, sender, subject, unread, and date filters.

Instructions

Bulk-manage messages with filtering. Supports dry-run, delete, move, and mark-read actions.

By default (limit=None) this scans the entire folder newest-first, so "find/act on all messages matching X" sees the whole folder, not a window. Pass limit only to cap how many messages are scanned (e.g. limit=200 scans at most the newest 200); the value is honored exactly, never silently clamped. Filtering is client-side.

The response reports coverage honestly: truncated is False only when the scan reached the end of the folder (stop_reason="folder_exhausted"), so a match count is a true total; if limit cut the scan short it is True. The mailbox is live, so counts are a point-in-time snapshot. Collection and action are separate phases; messages moved or deleted between them are reported as already_gone, not errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
actionNodelete
folderNoinbox
dry_runNo
account_idNo
destinationNo
unread_onlyNo
received_afterNo
sender_containsNo
subject_containsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries full burden and excels. It details scanning order (newest-first), exact limit handling, client-side filtering, response fields (truncated, stop_reason, already_gone), and the separation of collection and action phases. No contradictions.

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 description is well-structured with a clear opening, detailed parameter behavior, and response interpretation. It is concise and informative, though a slightly more compact explanation of default behavior could earn a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main behavior and key responses (truncated, already_gone) but omits explanations for many parameters. The presence of an output schema mitigates missing return value details, but parameter semantics remain incomplete for a tool with 10 optional parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain parameters. It only provides detailed semantics for 'limit'; other parameters like 'action', 'folder', 'destination', and filter criteria are named but not described. An agent would need to infer their meaning from context.

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 states 'Bulk-manage messages with filtering' and lists supported actions (dry-run, delete, move, mark-read). This clearly identifies the tool's purpose and distinguishes it from single-message tools like delete_message or move_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 explains default behavior (full folder scan) and the exact semantics of the limit parameter, but does not explicitly state when to prefer this tool over alternatives like looping over individual actions. The context of sibling tools makes the use case clear, but explicit guidance would improve the score.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jspv/msgraph-email-calendar-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server