Skip to main content
Glama
SinoEdwards

Mail Agent MCP

by SinoEdwards

imap_check_spam

Check a mail folder for spam by analyzing sender domains and email headers, detecting bulk mailers, authentication failures, and mismatched reply-to domains.

Instructions

Check emails in a folder for spam. Combines sender-domain checks (known spam/disposable domains, suspicious patterns) with deterministic raw-header analysis: bulk-mailer X-Mailer/User-Agent signatures, Precedence: bulk, DMARC/SPF/DKIM failures in Authentication-Results, and List-Unsubscribe / Reply-To domains that do not match the sender. Header checks catch scam mail from fresh, unlisted domains that pass the domain check. Returns domain-based spam, a separate list of header-flagged mails, and domain statistics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoFilter by sender (optional)
limitNoMaximum number of emails to check
sinceNoCheck emails since date (YYYY-MM-DD)
folderNoFolder nameINBOX
accountIdYesAccount ID
includeHeaderChecksNoAlso run deterministic raw-header checks (X-Mailer bulk tools, Precedence: bulk, DMARC/SPF/DKIM failures, List-Unsubscribe/Reply-To domain mismatches) on top of the sender-domain check. Fetches message headers in one extra batch round-trip. Set false to skip header analysis and only check sender domains.
Install Server

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden, and it performs well: it discloses the exact checks performed (bulk-mailer X-Mailer/User-Agent signatures, Precedence: bulk, DMARC/SPF/DKIM failures, List-Unsubscribe/Reply-To mismatches), the extra network cost for header checks ('Fetches message headers in one extra batch round-trip'), and the structure of what is returned. The only notable gap is that it never explicitly states that the operation is read-only and modifies nothing, though the verb 'check' and the existence of separate mutation siblings make this inferable.

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 front-loaded with the core purpose in the first sentence, and every subsequent sentence earns its place: methodology, rationale for the header layer, and return composition. The middle methodology sentence is dense but each listed check carries decision-relevant signal for the agent. It is longer than the minimum, but none of it is filler, so the length is justified.

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?

Given there is no output schema, the description's statement of return composition ('domain-based spam, a separate list of header-flagged mails, and domain statistics') is helpful but underspecified — the agent cannot know the exact result shape, field names, or types. Side-effect guarantees (that nothing is deleted or moved) are only implicit, and error/edge behavior for invalid accounts or folders is not addressed. For a 6-parameter analysis tool with zero annotations and no output schema, this is adequate but leaves real gaps.

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 baseline of 3 applies. The description adds some meaning beyond the schema by explaining why the header-check layer exists and what it catches (scam mail from fresh, unlisted domains), which enriches includeHeaderChecks semantically. However, for from, since, limit, and folder, the description contributes nothing beyond what the schema already documents, so the added value is marginal.

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 opening sentence 'Check emails in a folder for spam' states a specific verb, resource, and purpose, and the description elaborates with a concrete two-stage methodology (sender-domain checks plus deterministic raw-header analysis). It is clearly distinguishable from siblings like imap_delete_spam (which deletes rather than checks) and imap_domain_stats (which reports statistics rather than inspecting messages), and the return composition ('domain-based spam, a separate list of header-flagged mails, and domain statistics') further pins down its identity.

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?

The description implies when to use the tool through its methodology explanation, notably that 'Header checks catch scam mail from fresh, unlisted domains that pass the domain check,' which justifies enabling the header layer. The includeHeaderChecks parameter description adds explicit when/when-not guidance ('Set false to skip header analysis'). However, no sibling is ever named and there is no explicit routing such as 'use imap_delete_spam to remove flagged mail' or 'use imap_search_emails for general search,' so usage guidance remains implied rather than explicit.

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