Skip to main content
Glama

mail_search

Search emails by meaning using AI embeddings, not just keywords. Filter by sender, recipient, attachments, mailbox, sent/received, and flagged.

Instructions

Semantic search for emails using AI embeddings. Finds emails by meaning, not just keywords. Supports filtering by sender, recipient, attachments, mailbox, sent/received, and flagged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results (default 30)
queryYesNatural language search (e.g., 'invoices', 'meeting notes', 'from John about project')
senderNoFilter by sender name or email address
mailboxNoFilter by mailbox name (e.g., 'INBOX', 'Archive', 'Sent Messages')
sort_byNoSort by relevance (default) or date (newest first)
days_backNoOnly emails from last N days (0 = all time)
recipientNoFilter by recipient name or email address
sent_onlyNotrue = only sent emails, false = only received emails, omit for all
flagged_onlyNoOnly show flagged/starred emails
include_junkNoInclude emails from Junk/Trash folders (excluded by default)
has_attachmentNoFilter to only emails with attachments (true) or without (false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.8

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose a meaningful behavioral trait: ranking is semantic-embedding based rather than keyword based, which explains result relevance. It omits other behaviors such as default limits, pagination, return format, and any permission or rate constraints, so gaps remain.

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?

Three short front-loaded sentences with the core purpose stated first. Efficient overall, though the final sentence enumerating filters overlaps with structured schema fields and mildly duplicates information.

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

Completeness3/5

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

For an 11-parameter, no-annotation, no-output-schema tool, the description covers purpose and filter scope but says nothing about what results look like, default/vs-max limits, or how relevance scores are returned. Adequate but leaves real gaps an agent would want filled.

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 every parameter is already documented in the schema and the baseline is 3. The description's list of filter categories (sender, recipient, attachments, mailbox, sent/received, flagged) largely restates what the schema already provides and adds no syntax or semantic detail beyond it.

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) and resource (emails) plus the distinguishing mechanism (semantic AI embeddings, 'by meaning, not just keywords'). This implicitly separates it from keyword-based siblings, but it never names the near-duplicate tools it competes with (mail_find, smart_search, messages_search), so an agent must still infer which one to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what the tool does but gives no when-to-use or when-not-to-use guidance, and never references the alternative search tools in the sibling list. There is no stated condition that would route an agent here rather than to mail_find or smart_search.

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