Skip to main content
Glama
swapnilsurdi

email-mcp

by swapnilsurdi

get_emails

Fetch recent emails from INBOX and Junk without marking them read, or search the entire mailbox using server-side IMAP queries by sender, subject, date, or attachment.

Instructions

Fetch or search emails. Never marks mail read. Defaults to INBOX + Junk.

Two modes, reported by searched_window_only in the result:

  • No search terms: fast — the most-recent page*page_size per folder, served from an in-memory cache when warm. searched_window_only=true here, so an empty result means 'not in the recent window', not 'doesn't exist'. fresh=true forces a live read past the cache.

  • Search (query, from_address, subject, since=YYYY-MM-DD, has_attachment, or raw filters.criteria): runs SERVER-SIDE over the whole mailbox — query is a full-text IMAP search, so matches outside the recent window are found. searched_window_only=false.

body=false omits message bodies (cheap headers + attachment metadata — ideal for finding a message before opening it). cached=true keeps the 60-min result-set cache for stable pagination. Each message includes uid/uidvalidity for robust follow-up actions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNo
filtersNo
queryNo
foldersNo
include_sentNo
strip_to_textNo
pageNo
page_sizeNo
cachedNo
bodyNo
from_addressNo
subjectNo
sinceNo
has_attachmentNo
freshNo
Behavior5/5

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

With no annotations, the description fully discloses key behaviors: never marks mail read, defaults to INBOX+Junk, caching behavior, modes, and result markers like searched_window_only and uid/uidvalidity.

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 well-structured with a clear summary and bulleted modes. It is slightly long but every sentence adds value; could be slightly more concise.

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 (15 params, no output schema), the description covers modes, caching, pagination, and result fields. Missing details on account selection and attachment handling beyond has_attachment, but overall quite complete.

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?

Given 0% schema coverage, the description explains many parameters (body, cached, fresh, query, from_address, subject, since, has_attachment, filters.criteria) and the two modes. However, parameters like account, folders, include_sent, strip_to_text, page, page_size are not fully described, though page/page_size are implied.

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 states 'Fetch or search emails' and distinguishes two modes (fast recent vs. full server-side search), which differentiates it from sibling tools like mark_email or send_email.

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 explains when to use each mode and the role of cached vs. fresh results. It does not explicitly mention when not to use this tool or alternatives, but the sibling context and tool names provide adequate guidance.

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/swapnilsurdi/email_mcp'

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