Skip to main content
Glama
Cloud Mail MCP

Cloud Mail MCP

search_messages

Read-onlyIdempotent

Search owned mailbox messages by case-insensitive substring across subject, sender, recipient, or body; filter by inbox or sent folder and paginate partial results.

Instructions

Search owned mailbox pages by substring (case-insensitive). exhausted=false means partial results; continue with nextBeforeId. Body search includes raw HTML.

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
fieldNoall
queryYes
folderNoinbox
beforeIdNo
maxPagesNo
accountIdNo
maxResultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

With readOnlyHint/idempotentHint already declaring the safety profile, the description still earns credit by disclosing pagination behavior (partial results signaled by exhausted=false, resume via nextBeforeId) and a real caveat that body search returns raw HTML. The cursor field is called 'nextBeforeId' while the schema parameter is 'beforeId', which introduces some naming ambiguity.

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?

Three dense sentences with zero filler; the core matching rule and the partial-result rule are front-loaded. Nothing is redundant with the title or the schema.

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?

There is no output schema, so the description must carry return-value semantics, and it does explain the exhausted flag and the resume cursor but not the result shape or ordering. For a 7-parameter, open-world search tool, the missing field/folder/limit semantics leave it only minimally complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 7 parameters, so the description carries the burden but only covers the query semantics (case-insensitive substring) and body matching. Field, folder, maxPages, maxResults, beforeId, and accountId are left entirely unexplained, including their defaults and bounds, for a search tool where field/folder selection is the main scoping decision.

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), resource (owned mailbox pages), and matching mechanism (case-insensitive substring), so the operation is immediately legible. It does not, however, differentiate itself from the sibling list_messages or get_message, so an agent must infer which retrieval tool fits which case.

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 statement of when to use search_messages versus list_messages or get_message, and no prerequisites (e.g. whether accountId is required when multiple accounts exist). The continuation hint ('exhausted=false ... continue with nextBeforeId') is behavioral rather than a use-case guideline.

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