Skip to main content
Glama
gmail-reader-mcp

gmail-reader-mcp

by jgimitola

search_emails

Find Gmail messages using keywords and operators like from:, subject:, has:attachment, or date ranges; scans subject, body, sender, recipients, and attachment names.

Instructions

Search all Gmail mail using Gmail search syntax (keywords plus operators like from:, subject:, has:attachment, after:, newer_than:). Searches subject, body, sender, recipients, and attachment names.

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_emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesGmail search query — same syntax as the Gmail search box. Plain keywords ("invoice acme") or operators: from:, to:, subject:, has:attachment, filename:pdf, is:unread, label:, after:2024/01/01, before:, newer_than:7d, larger:5M, "exact phrase", OR, -exclude.
pageTokenNoToken from a previous response ("nextPageToken") to fetch the next page
maxResultsNoNumber of results to return (max 50)
includeSpamTrashNoAlso search Spam and Trash. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full load. It usefully discloses the matching scope (headers plus body plus attachment names) and the syntax lineage from the Gmail search box, which is real behavioral information. It says nothing about read-only nature, authentication requirements, result ordering, pagination mechanics, or rate/token limits, and it does not mention that Spam/Trash are excluded by default even though that is a meaningful behavioral default.

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?

Two tight sentences, front-loaded with the verb and scope, followed by the matched-field inventory. No filler and nothing repeated from 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?

The tool is simple, fully specified in schema, and inherently read-only, but there is no output schema and the description does not describe the shape of results (message IDs, threads, snippets) or how paging behaves in practice. It is adequate to invoke correctly but leaves the agent guessing about what comes back.

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 the four parameters are already documented at the field level, including operators, pagination token semantics, and maxResults bounds. The description reinforces that query follows Gmail search syntax but adds no semantics beyond the schema. Baseline 3 is appropriate.

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) and resource (all Gmail mail) and names the query grammar. It also enumerates which fields are matched (subject, body, sender, recipients, attachment names), which lets an agent predict recall. It stops short of explicitly contrasting with siblings like list_emails or get_email, so it is clear but not fully differentiated.

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 this instead of list_emails, get_emails, or get_email, and no when-not guidance. The only implicit guidance is that this is the free-text/operator search path, inferred from the query syntax rather than stated.

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