Skip to main content
Glama
gmail-mcp

gmail-mcp

by cart1984

mail_search

Read-only

Search Gmail messages with Gmail search syntax to find mail by sender, subject, label, date, or attachment; results are returned newest first.

Instructions

Search mail with Gmail search syntax, e.g. invoice, from:amazon, subject:"tax return", has:attachment dentist, newer_than:30d, label:receipts, in:anywhere (spam and trash too). Newest first.

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

Input Schema

NameRequiredDescriptionDefault
topNo
queryYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish read-only and open-world behavior. The description adds useful scope and ordering details: Gmail search syntax, inclusion of spam/trash via `in:anywhere`, and newest-first results.

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?

The definition is compact and front-loaded: it states the operation and syntax immediately, then adds scope and ordering without redundant prose. Every example appears purposeful.

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?

For a simple two-parameter search tool with an output schema and safety annotations, this is nearly complete. The only notable gap is the unexplained `top` parameter, which controls result count.

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?

The required `query` parameter is well explained through multiple Gmail syntax examples, but the `top` parameter is not mentioned despite schema coverage being 0%. The description compensates strongly for `query` but leaves `top` undocumented.

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 uses a specific verb and resource, "Search mail," and clearly frames it as Gmail-syntax search rather than a generic list or fetch. The examples make the purpose concrete and distinguish it from retrieval siblings.

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?

The description implies usage through query examples and notes that `in:anywhere` includes spam and trash, but it does not explicitly say when to choose this over `mail_list`, `mail_get`, or `mail_thread`.

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