Skip to main content
Glama

Search Emails

email_search
Read-onlyIdempotent

Search messages by content. Fulltext mode (default) substring-matches subject/body/addresses of EMAIL messages and returns {items, pagination} with cursor paging. Semantic mode ranks by vector-embedding similarity and returns {results} scored 0-1 — each result spans ANY channel (check the channel field) and includes the message id for email_get / email_thread_get follow-ups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoSearch mode. `fulltext` (default) does substring matching over subject/body/addresses of EMAIL messages and supports cursor pagination. `semantic` ranks by vector-embedding similarity — better for meaning-level questions ("emails about the contract renewal") — but searches messages across ALL channels (each result carries a `channel` field) and does not paginate.
limitNoMax results (fulltext: 1-100, default 20; semantic: 1-50, default 10).
queryYesSearch query text.
cursorNoPagination cursor from a previous fulltext response's `pagination.nextCursor`. Fulltext mode only.
labelsNoOnly return messages carrying ALL of these labels. System labels: `unread`, `read`, `archived`, `spam`. Case-insensitive. Use email_label to change them.
agentIdNoFilter results to a specific agent.
thresholdNoMinimum similarity score 0-1 (semantic mode only, default 0.7).
includeSpamNoInclude messages classified as spam on arrival. Excluded by default. Naming `spam` in `labels` also counts as asking for it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already indicate readOnly, openWorld, idempotent, and non-destructive behavior, and the description aligns with these by describing a pure search operation. It adds important behavioral context such as the output shape, pagination differences, and the fact that semantic mode can return non-email results. No contradictions exist between the description and annotations.

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?

The description is concise—two sentences—and front-loads the core purpose ('Search messages by content') before explaining mode-specific details. It is well-structured, covering fulltext mode's substring matching and cursor pagination, then semantic mode's similarity ranking and multi-channel scope, without any redundant or vague phrasing.

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?

Given the tool's complexity (dual modes, 8 parameters, divergent return shapes), the description is sufficiently complete. It explains both modes, their outputs, and parameter nuances (like includeSpam and labels), and even mentions follow-up actions. Combined with the thorough schema, an agent has all necessary information to call the tool correctly.

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?

The schema provides 100% coverage for all 8 parameters with detailed descriptions, including mode-specific behavior (e.g., limit defaults, threshold relevance, labels system). The main description adds a high-level overview of mode differences and return structures, but most parameter semantics are already well-documented in the schema. The description does reinforce key points like default mode and pagination, which adds slight value beyond the schema.

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 the tool 'searches messages by content' and distinguishes between fulltext and semantic modes, which differentiates it from sibling tools like email_list (which likely lists without content search) and email_get (which retrieves a specific message). The verb 'search' is specific and the resource 'messages' is explicit, leaving no ambiguity about the tool's primary function.

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 on when to use each mode: fulltext for substring matching on emails, semantic for similarity across all channels. It also directs users to 'check the channel field' for semantic results and suggests follow-up via email_get or email_thread_get, giving clear context on tool selection. Parameter behaviors like cursor pagination (fulltext only) and threshold (semantic only) are explained, so an agent knows exactly when to use this tool versus alternatives.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.