Skip to main content
Glama
Albretsen

MCP Emails

Organize Email

email_organize
Destructive

Move, copy, flag, or archive emails in one inbox. Search and move multiple messages to a target folder for efficient mailbox organization.

Instructions

Move, copy, flag or archive messages in one inbox. Get message ids from email_read first. On Gmail a move adds the destination label and removes INBOX, leaving other labels in place. Needs manage:folders; deleting is the separate email_delete tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ccNoCc recipient to match: address, name, or fragment.
toNoTo recipient to match: address, name, or fragment.
bodyNoText to find in the body. On Gmail this matches the whole message.
fromNoSender to match: address, name, or fragment.
textNoText to match anywhere, headers included.
inboxNoInbox email address; an alternative to inbox_id, which wins when both are given.
limitNoCap on messages moved. Default 500.
queryNoProvider-native raw query (escape hatch); prefer the structured fields. Ignored on Fastmail.
sinceNoReceived on or after this date or datetime (no timezone = UTC).
actionYesOperation to run. move = one message_id to destination_folder_id; move_batch = the same for up to 500 message_ids; copy = duplicate into destination_folder_id, original stays, IMAP/Outlook/Fastmail only (never Gmail); copy_batch = the same for up to 500 message_ids; flag = set read/unread/flagged on message_ids via flag_action; archive = move one message_id out of the Inbox; search_and_move = move everything matching a search, the only action the search filters apply to.
beforeNoReceived strictly before this date or datetime (no timezone = UTC).
unreadNotrue = unread only; false = read only; omit for both.
flaggedNotrue = only flagged/starred messages. Ignored on Outlook.
subjectNoText to match in the subject; phrases match as-is.
inbox_idNoInbox UUID. Optional when the key has exactly one inbox. Otherwise pass this or `inbox`; omit both and the error lists every inbox_id.
message_idNoProvider-native message id from a list or search.
flag_actionNoState to apply to every listed message; flag/unflag add or remove the star.
message_idsNoProvider-native message ids to move.
has_attachmentNotrue = only messages with an attachment. Ignored on generic IMAP.
idempotency_keyNoOpaque key for one operation, outbound or mailbox mutation. Reuse it only when retrying the identical request within 24 hours: the retry is collapsed, not repeated, which matters most for copy. Reuse with different arguments is rejected; omit it for normal behaviour.
include_foldersNoFolder names to search. IMAP covers INBOX only when omitted.
destination_folder_idNoTarget folder: an alias (inbox, sent, drafts, trash, archive, spam), a folder name, or a folder id. Names and aliases resolve for you.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.4

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark the tool as mutating, and the description adds useful behavioral context: Gmail's move label semantics, the permission prerequisite, and the one-inbox scope. This is real operational detail beyond what the annotations convey.

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 dense sentences cover scope, workflow prerequisite, provider behavior, permission, and sibling routing. There is no filler, repetition, or restatement of the tool name.

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?

For a complex tool with seven action variants and no output schema, the description provides the essential invocation context: where ids come from, what permission is needed, how Gmail behaves, and the deletion boundary. The schema handles per-action parameter constraints, so the description is appropriately balanced.

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 does not need to document the 22 parameters. The prose reinforces the message-id workflow but does not add parameter-level meaning beyond what the schema already provides.

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 starts with a clear verb+resource pairing: 'Move, copy, flag or archive messages in one inbox.' It also distinguishes the tool from email_delete by explicitly stating that deleting is a separate tool, so the agent can identify the tool's scope 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 Guidelines4/5

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

Gives concrete workflow guidance: retrieve message ids from email_read first, requires manage:folders permission, and explicitly routes deletion to email_delete. It does not spell out when the search-based action should be used instead of the id-based actions, but the schema's action parameter fills that gap.

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

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/Albretsen/MCPEmails'

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