Skip to main content
Glama
Automata MCP

Automata MCP

Search emails

search-emails
Read-onlyIdempotent

Find emails by combining sender, recipient, subject, body text, folder, date range, unread status, or attachment filters to locate specific messages.

Instructions

[Email] Find emails by from (part of a sender's name or address), to (part of a To or Cc recipient), subject (words or part of the subject) and text (words in the body), combined with AND, optionally inside one folder and a since/until range. At least one of from, to, subject or text is required. Answers one page, newest first, in the same shape as list-emails: page with nextPage while hasMore is true. from, to and subject match synced headers. text is passed to the mail server's own search, whose matching varies by provider (Gmail matches whole words, most servers substrings) and which only covers the folders listed in bodySearch.searched — finding nothing is not proof an email does not exist.

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
toNoPart of a To or Cc recipient's name or address
fromNoPart of a sender's name or address, e.g. "acme.com" or "Maria"
pageNo1-based page, newest first
textNoWords in the email body, searched by the mail server
limitNoHow many emails to return in this page
sinceNoOnly emails received at or after this date
untilNoOnly emails received at or before this date. Pass back `window.until` when paging.
folderNoFolder path from list-mail-folders. Omit to search every synced folder.
unreadNotrue for unread emails only
subjectNoWords in the subject, or part of it
hasAttachmentsNotrue for emails with attachments only

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (which already declare read-only, idempotent, non-destructive), it discloses pagination semantics (`nextPage` while `hasMore`), newest-first ordering, that `from`/`to`/`subject` only match synced headers, and that empty results are not proof of absence. That false-negative warning is exactly the kind of behavioral nuance annotations cannot express.

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?

It is a single dense paragraph, but it is front-loaded with purpose and matching rules, and almost every clause carries information (AND semantics, page shape, provider variance). The backtick-heavy notation and long final sentence cost a little readability, keeping it off a 5.

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?

For an 11-parameter tool with no output schema, the description supplies the missing return contract ("same shape as list-emails: page with `nextPage` while `hasMore` is true") plus the key caveat about search reliability. Nothing an agent needs to call it correctly — required criteria, scoping, paging, limitations — is absent.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema lacks: criteria are combined with AND, `folder`/`since`/`until` act as a scope around the criteria, and `text` is handed to the mail server with provider-dependent matching. It also explains the paging contract for `page`/`until` beyond the per-field schema text.

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 states a specific verb and resource ("Find emails by `from` ... `subject` ... `text`") and spells out the AND combination and optional folder/date scoping, so the difference from a plain browser like list-emails is clear from the first sentence. An agent can tell what this tool returns (one page of matching emails, newest first) without opening the schema.

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?

It gives a hard precondition ("At least one of from, to, subject or text is required") and a real caution about when results are unreliable (server-side `text` search varies by provider, only covers `bodySearch.searched`). What it does not do is name a sibling as the alternative — e.g. browsing a folder with list-emails — so the when-not route is left implicit.

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