Skip to main content
Glama
MadLlama25

Fastmail MCP Server

by MadLlama25

advanced_search_metadata

Search emails with advanced filters (mailbox, sender, subject, date, attachment, unread, pinned) and return only metadata—no body content—to support privacy-sensitive routing and classification.

Instructions

Same filter capabilities as advanced_search (single-mailbox scoping via mailboxId, multi-mailbox intersection via requiredMailboxIds, exclusion via excludeMailboxIds, plus sender / recipient / subject / free text / date / attachment / unread / pinned) but returns ONLY metadata on each match — id, threadId, subject, from, to, cc, replyTo, receivedAt, hasAttachment, keywords. Does NOT return preview or any body-derived content. Use in privacy-sensitive flows where the routing decision is made from headers alone — for example, when classifying customer mail by sender / recipient / subject / thread state without ingesting body content. The free-text query still searches body content on the server side; only the result envelope comes back without body excerpts. 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.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the metadata-only return, absence of preview/body content, server-side body search, and conditional envelope format. It does not mention permission requirements or rate limits, but for a read-only search tool, key traits are well covered.

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 moderately long but each sentence adds distinct value: capability reference, return fields, privacy use case, body-search caveat, and response envelope. It is front-loaded and structured logically, though slightly dense.

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?

Given the tool's complexity (14 parameters, no output schema), the description covers the core purpose, differentiation, valid use case, and response format. It does not explain pagination or limit behavior, but those are documented in the schema, so completeness is adequate.

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 is 3. The description adds conceptual grouping of mailbox filter parameters, but this largely mirrors schema details. It adds marginal value beyond the schema, which is sufficient to hold the baseline.

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 explicitly names the tool as a variant of advanced_search with identical filters but metadata-only returns. It lists exact returned fields and clearly distinguishes it from the body-returning sibling, making the purpose unambiguous.

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 provides explicit guidance: 'Use in privacy-sensitive flows where the routing decision is made from headers alone' and contrasts with advanced_search. It also clarifies that free-text still searches body server-side, setting correct expectations for when to choose this tool.

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