Skip to main content
Glama
MadLlama25

Fastmail MCP Server

by MadLlama25

advanced_search

Search emails with combined filters for sender, recipient, subject, date, attachments, and mailbox membership, including multi-mailbox intersections and exclusions.

Instructions

Advanced email search with multiple criteria. Mailbox scoping supports a single mailbox (mailboxId), an intersection of multiple mailboxes (requiredMailboxIds — must be a member of ALL listed mailboxes), and exclusion (excludeMailboxIds — member of NONE of the listed mailboxes), alongside the standard sender / recipient / subject / free-text / date / attachment / unread / pinned filters. When the server reports a total match count, results are wrapped in a {"total", "items"} JSON envelope; otherwise a bare JSON array is returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoFilter by recipient email
fromNoFilter by sender email
afterNoEmails after this date (ISO 8601)
limitNoMaximum results (default: 50)
queryNoText to search for in subject/body
beforeNoEmails before this date (ISO 8601)
subjectNoFilter by subject
isPinnedNoFilter pinned emails
isUnreadNoFilter unread emails
ascendingNoSort oldest first instead of newest first (default: false)
mailboxIdNoSearch within a single mailbox. For an intersection across multiple mailboxes (e.g. Inbox AND a label folder), use requiredMailboxIds instead.
hasAttachmentNoFilter emails with attachments
excludeMailboxIdsNoExclude emails that are members of ANY of these mailbox IDs (maps to JMAP inMailboxOtherThan). Useful for queries like "in a parent label but not its archive sub-folder". Combines cleanly with mailboxId / requiredMailboxIds.
requiredMailboxIdsNoRequire membership in ALL of these mailbox IDs (intersection / AND semantic). Use this for queries like "in Inbox AND a label folder" — pass both mailbox IDs in the array. If mailboxId is also passed, it is folded into the intersection (de-duplicated). JMAP cannot express multi-mailbox membership in a single FilterCondition, so this builds a FilterOperator AND over multiple inMailbox conditions on the server.
Behavior5/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 does so excellently. It discloses the variable response envelope ('total'/'items' vs bare array), the JMAP technical limitation that forces a FilterOperator AND, and the exact membership semantics for require/exclude mailbox IDs. This is high-value behavioral context beyond the schema.

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 relatively long but every sentence delivers unique information: scoping semantics, the list of filters, the JSON envelope behavior, and a JMAP rationale. It is front-loaded with the core purpose and then details. No fluff, though it could be slightly tightened.

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?

Given 14 optional parameters, no output schema, and no annotations, the description covers all significant aspects: parameter semantics, response format, edge cases like deduplication of mailboxId, and the reasoning behind the implementation. This is a well-rounded spec that allows an agent to invoke the tool correctly and predict results.

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

Parameters5/5

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

Even though schema coverage is 100%, the description adds critical meaning to the mailbox parameters: it clarifies that requiredMailboxIds means membership in ALL (intersection), excludeMailboxIds means NONE, and that mailboxId is folded into the intersection. It also connects hasAttachment/excludeMailboxIds to concrete query patterns. This goes well beyond the schema 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 clearly identifies the tool as 'Advanced email search with multiple criteria' and enumerates the specific filter dimensions (sender, recipient, subject, free-text, date, attachment, unread, pinned) plus mailbox scoping. This distinguishes it from simpler search siblings like search_emails and advanced_search_metadata.

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 provides concrete usage context, such as 'Use this for queries like “in a parent label but not its archive sub-folder”' and explains when requiredMailboxIds is appropriate. It does not explicitly contrast with search_emails or mention when NOT to use it, but the advanced semantics make the intended use case clear.

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/MadLlama25/fastmail-mcp'

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