Skip to main content
Glama

Search Email

search_messages
Read-only

Search email messages by query to locate specific mail in a user's mailbox or an allowed shared mailbox. Returns matching results with an optional limit on how many to return.

Instructions

Search email messages

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": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoNumber of results to return (default: 25)
queryYesSearch query string
mailboxNoEmail address of another mailbox to act on (delegated or shared), e.g. 'someone@example.com'. Omit for your own mailbox; required when this server signs in as an application. Only addresses this server is configured to allow will be accepted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.3/5.0
Behavior2/5

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

The readOnlyHint=true annotation already establishes the safety profile, lowering the bar, but the description adds nothing on top of it. It does not disclose result ordering, pagination behavior, whether 'top' truncates silently, or what happens when the search matches nothing — all things an agent would want before calling a search tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three words, front-loaded and free of filler, but the brevity here reflects under-specification rather than efficiency. There is no wasted wording, yet nothing is structured to help an agent decide or call correctly.

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 three-parameter tool with a free-form query string and no output schema, the description should at minimum say what is searched and how results are shaped. With annotations covering read-only status and schema covering parameters, the remaining gap is query semantics and result behavior, which is left entirely unaddressed.

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%, including a detailed explanation of the mailbox parameter (delegated/shared, required in app-only mode, allowlist-restricted), so the schema carries parameter semantics fully. The description contributes no additional meaning about 'query' syntax or 'top' semantics, so the baseline 3 applies.

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

Purpose2/5

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

"Search email messages" restates the tool name (search_messages) and title (Search Email) almost verbatim, adding no distinguishing detail. It does convey the verb+resource, but an agent cannot tell from it how this differs from siblings like list_messages, scan_messages, or search_files, nor what kind of search (full-text, subject-only, filter-based) is performed.

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?

There is no when-to-use guidance at all: no indication of when to prefer this over list_messages or scan_messages, no prerequisites, and no exclusions. The only usage-relevant detail (mailbox omission/app-mode) lives in the schema, not the description.

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

Deploy Server

Other Tools