Skip to main content
Glama

gmail_search_messages

Search personal or workspace emails via Gmail API with query syntax (read-only).

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

Input Schema

NameRequiredDescriptionDefault
queryYesSearch query using Gmail syntax (e.g., "from:xAI compute", "is:unread", "subject:launch").
max_resultsNoMaximum number of messages to return (1-20, default 5).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the disclosure burden and does deliver the key safety fact — "(read-only)". Beyond that it is silent on authentication scope, rate limits, whether results are message IDs or full bodies, and pagination behavior for a capped result set.

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?

A single front-loaded sentence with no filler; the read-only qualifier is placed where it will be seen immediately.

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 a simple two-parameter read tool this is mostly adequate, but with no output schema the description should say what a search returns (message IDs, snippets, or full messages), since that determines whether an agent can chain results into draft or read operations.

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 coverage is 100%, so the schema already documents both `query` (with Gmail syntax examples) and `max_results` (1-20, default 5). The description's mention of "query syntax" reinforces but adds no meaning beyond the schema, so the baseline 3 applies.

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?

The description gives a specific verb+resource ("Search ... emails") plus scope ("personal or workspace") and the underlying API, which lets an agent distinguish it from gmail_create_draft. It does not explicitly name a sibling alternative, so it stops short of full differentiation.

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?

Usage is only implied: it is clearly a retrieval tool for mail, and "personal or workspace" hints at the two account contexts. There is no explicit when-to-use vs. when-not, no guidance on chaining results into gmail_create_draft, and no mention of query constraints.

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.