Skip to main content
Glama
SinoEdwards

Mail Agent MCP

by SinoEdwards

imap_add_keyword

Assign custom IMAP keywords or labels to an email, such as color tags or app labels. Passes the keyword verbatim while rejecting system flags; fails if the server does not accept it.

Instructions

Set an arbitrary custom (non-system) IMAP keyword/label on an email — e.g. a provider color label like Open-Xchange's $cl_1..$cl_10, Apple Mail's $MailFlagBit0..$MailFlagBit2, or an app tag such as $promotion. Unlike imap_flag_email (which only ever sets the system \Flagged flag), this passes the keyword through verbatim, but rejects backslash-prefixed system flags (e.g. \Flagged, \Seen, \Deleted) — use the dedicated flag/read tools for those. Not every IMAP server permits custom keywords (see the mailbox's PERMANENTFLAGS) — if the server rejects or silently ignores the change, this call fails rather than reporting success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesEmail UID
folderNoFolder nameINBOX
keywordYesIMAP keyword to set, passed through verbatim (e.g. "$cl_3", "$MailFlagBit0", "$Junk")
accountIdNoAccount ID (from imap_list_accounts). Optional if accountName is given or only one account is configured.
accountNameNoAccount name instead of accountId. Optional if accountId is given or only one account is configured.
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses that the keyword is passed through verbatim, that system flags are rejected, that success depends on server PERMANENTFLAGS, and that the call deliberately fails rather than silently reporting success if the server ignores the change.

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?

The description is three information-dense sentences with no filler. The core purpose and examples are front-loaded, the distinction from imap_flag_email comes second, and the failure-mode caveat closes it. Every sentence earns its place.

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?

The description covers what the tool does, when to use it, when not to use it, how the keyword is processed, server-side limitations, and failure semantics. For a five-parameter mutation tool with no output schema and no annotations, this is more than sufficient for an agent to select and invoke it correctly.

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 real value beyond the schema: it explains the custom/non-system constraint, gives provider-specific keyword families ($cl_1..$cl_10, $MailFlagBit0..$MailFlagBit2), and clarifies rejection of backslash-prefixed flags. This goes beyond the schema's shorter parameter descriptions.

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 opens with a specific verb and resource — 'Set an arbitrary custom (non-system) IMAP keyword/label on an email' — and immediately clarifies scope by excluding system flags. It also names the closely related sibling imap_flag_email and explains what that tool does instead, making the distinction explicit.

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?

The description explicitly says when to use this tool versus alternatives: 'Unlike imap_flag_email (which only ever sets the system \Flagged flag)' and instructs agents to use the dedicated flag/read tools for backslash-prefixed system flags. It also adds a server-support caveat about PERMANENTFLAGS, so agents understand when the call may fail.

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

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/SinoEdwards/mail-agent-mcp'

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