Skip to main content
Glama
email-mcp

email-mcp

by a1exsun

search_emails

Search a mailbox folder newest first using optional filters—sender, recipient, subject, body, date, size, read/flagged status, account, or Gmail syntax—to find matching messages.

Instructions

Search a folder, newest first. All filters are optional and combined with AND.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
bodyNo
fromNo
seenNofalse = unread only
limitNo
sinceNoDate, e.g. 2026-10-01
beforeNoDate, e.g. 2026-10-31
folderNoFolder path from list_foldersINBOX
largerNoSize in bytes
accountNoMailbox: WORK | PERSONAL. Default WORK
flaggedNo
subjectNo
gmail_rawNoGmail only: Gmail search syntax, e.g. "has:attachment older_than:7d"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does contribute real behavior: results are ordered newest first and filters are AND-combined. It stops short of the traits that matter most for a 13-parameter read tool with no output schema: nothing about result limits, pagination, whether searches are read-only, or how gmail_raw interacts with the structured filters.

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?

Two short sentences, zero filler, with the ordering and filter-combination facts front-loaded. Nothing in the text is redundant with the title or restates the name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter tool with zero annotation coverage and no output schema, the definition is thin. It says nothing about what a result looks like, how many come back by default, whether paging is possible, or when to prefer gmail_raw over structured filters, all of which an agent needs to call this correctly.

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 coverage is 54%, so roughly half the 13 parameters are self-documented (seen, since, before, folder, larger, account, gmail_raw) while subject, body, to, from, limit and flagged are bare. The description adds the genuinely non-obvious AND-combination semantic that the schema cannot express, but it does not compensate for the undocumented half or clarify gmail_raw as an alternative to the structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Search') plus the scoped resource ('a folder'), and the tool name supplies the email subject matter. It is clearly differentiated from mutation siblings like delete_emails or move_emails, though it does not contrast itself with read_email or list_folders, which an agent might reasonably consider for retrieval.

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?

'All filters are optional and combined with AND' gives useful guidance on how to compose a query when the agent does not know which filters matter. However, there is no explicit when-to-use or when-not-to-use guidance relative to siblings such as read_email (single message retrieval) or list_folders (folder discovery), so routing must be inferred.

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