Skip to main content
Glama

Mail Search

mail_search
Read-only

Search Gmail messages in Hermes using Gmail search syntax to locate specific emails and return matching IDs, threads, senders, subjects, dates, and snippets.

Instructions

Search emails in Hermes's Gmail using Gmail search syntax.

Supports the same operators as the Gmail search bar (e.g., from:alice, subject:invoice, after:2026/04/01).

Returns a list of dicts, each with keys: id, thread_id, sender, subject, date, snippet.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "mail_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (1-100)
queryYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered by structured data. The description adds useful behavioral context by naming the query dialect, but says nothing about result ordering, pagination, or truncation behavior when limit is hit. The return-shape sentence largely duplicates the output schema.

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 paragraphs, purpose front-loaded, examples immediately follow the claim about operator support. The return-keys sentence is somewhat redundant given an output schema exists, which is the only wasted text.

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?

For a two-parameter read-only search tool this covers the essentials: what it searches, what syntax it accepts, and what comes back. Ordering and pagination behavior are the main omissions, but they are minor given the annotations and output schema already supplied.

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 50%: limit is documented in the schema, but query has no schema description. The description compensates by explaining that query accepts Gmail search-bar operators and giving three concrete examples, which is real meaning beyond the bare string type. It adds nothing about limit, but that parameter is already covered.

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 and resource ('Search emails in Hermes's Gmail') plus the query dialect used, which is more than a restatement of the name. It does not explicitly distinguish itself from siblings like mail_get or mail_list_pending, so the agent must infer the difference from the name alone.

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?

Examples ('from:alice', 'subject:invoice', 'after:2026/04/01') show how to phrase a query and implicitly indicate this is the tool for filtered retrieval. No statement of when to prefer it over mail_get (single message) or mail_list_pending, and no exclusions or prerequisites are given.

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