Skip to main content
Glama

gmail_search

Search Gmail with query syntax like from:, is:unread, or has:attachment, and return matching message rows for review or follow-up.

Instructions

Search mail with Gmail query syntax and return the result rows.

Examples: 'from:alice has:attachment', 'is:unread label:work', 'subject:report after:2026/01/01'. The results stay on screen: gmail.read / gmail.list without arguments work on them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of result rows to return.
queryYesGmail search query (from:, to:, subject:, has:attachment, is:unread, is:starred, label:, in:, before:/after: YYYY/MM/DD, newer_than:2d, "exact phrase", OR, -word).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose a genuinely non-obvious behavioral trait: the result set persists as screen state so argument-less gmail.read/gmail.list operate on it. But it never states that the operation is read-only/non-destructive, nor anything about permissions or how many rows a default search returns.

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 short lines: purpose first, examples second, the state/continuation note third. No filler, and the most load-bearing sentence leads.

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's 'return the result rows' is the only clue about the return value, and it never says what a row contains (sender, subject, snippet, id) or how limit affects the output. Adequate to invoke correctly, but thin for a tool with zero annotations and no output schema.

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% and the query parameter already enumerates every supported operator, so the schema does the heavy lifting. The description's example queries add modest practical value by showing operator composition, but it says nothing about the 'limit' parameter or its default of 20.

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?

States a specific verb and resource ('Search mail with Gmail query syntax and return the result rows') and implicitly contrasts with browsing siblings by naming gmail.list and gmail.read as the no-argument consumers of the results. An agent can tell this is the query-driven entry point rather than a paged listing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Concrete query examples ('from:alice has:attachment', 'is:unread label:work') show intended usage, and the note that results stay on screen tells the agent the correct follow-up call is gmail.read/gmail.list with no arguments. However, it never explicitly says when to prefer gmail_search over gmail_list or gmail_open, and gives no exclusions.

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

Deploy Server

Other Tools