Skip to main content
Glama

gws-mcp__gmail_search

Read-only

Search Gmail messages using Gmail search syntax. Returns matching messages with flattened from/to/subject/date fields plus snippet and labels. Supports queries like "from:client@acme.com", "subject:proposal", "after:2024/01/01", "has:attachment", "label:important". A message's attachments are listed by gmail_read and read by gmail_get_attachment.

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": "gws-mcp__gmail_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesGmail search query (e.g., "from:john@example.com subject:Q4 proposal", "is:unread after:2024/06/01")
accountNoOptional email address of the connected account to use (e.g. 'user@gmail.com'). If omitted, the default account is used.
max_resultsNoMaximum number of messages to return (default: 10)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

readOnlyHint=true already tells the agent this is a safe non-mutating call, and the description adds genuinely new behavioral context by describing the returned record shape (flattened from/to/subject/date, snippet, labels) — valuable given there is no output schema. It stops short of disclosing that message bodies are not returned here, or any result-count/pagination limits beyond the max_results default.

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 sentences with the core capability front-loaded and the sibling routing last — good ordering, no filler. Minor waste: the inline query examples restate the schema's example, so that sentence partially duplicates structured data.

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?

With no output schema, the description carries the return-value burden and does so by naming the flattened fields and snippet/labels. What remains thin is operational context — pagination behavior, result caps, and the fact that this returns summaries rather than full message bodies — which an agent would need for larger searches.

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%, so all three parameters (query, account, max_results) are already documented in the schema, including examples and the default of 10. The description's query examples largely duplicate the schema's own example string and it says nothing about the account parameter or result-limit semantics, so it adds little 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 opens with a specific verb+resource ("Search Gmail messages") and immediately states the return shape ("flattened from/to/subject/date fields plus snippet and labels"), so an agent knows both what it does and what comes back. It also routes the attachment path to siblings ("A message's attachments are listed by gmail_read and read by gmail_get_attachment"), separating it from the read/detail tools.

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: the query-syntax examples ("from:...", "after:...", "has:attachment") suggest when search is appropriate, and the attachment sentence clarifies the boundary with gmail_read. However, there is no explicit guidance on when to prefer this over the sibling gws-mcp__gmail_list, no note on whether results are paginated or how max_results affects breadth, and no exclusion cases.

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.