Skip to main content
Glama

gmail_search

Search Gmail messages by query and return sender, subject, date, snippet, labels, and attachment info, or use ID-only format for bulk operations.

Instructions

Search Gmail. Returns enriched metadata per match (from/subject/date/snippet/labelIds/hasAttachments) by default. Set format='ids' for the lighter ID-only response (cheaper, useful for piping to bulk ops).

Input Schema

NameRequiredDescriptionDefault
emailNoGoogle account email. May be omitted when exactly one account is configured; required when multiple accounts are configured.
queryYesGmail search query
formatNoDefault 'metadata'. Use 'ids' to skip per-message header fetches.
page_tokenNoPagination cursor from a previous call
max_resultsNoDefault 20

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It usefully discloses that the default path performs per-message header fetches and that 'ids' skips them (a real cost/latency trait), but says nothing about auth requirements, page limits, rate limits, or result ordering.

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 sentences, zero filler, with the core purpose and default return shape front-loaded and the format alternative second. Every clause carries information.

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 correctly compensates by enumerating the returned fields (from/subject/date/snippet/labelIds/hasAttachments) and the alternate shape. Pagination cursor and max_results are covered by the schema, so the remaining gap is minor.

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 five parameters (including the format enum and account-selection rules for email) are already documented. The description reinforces the format tradeoff but adds no syntax, query-language, or default detail beyond the schema, matching the baseline for full coverage.

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 and resource ("Search Gmail") and immediately characterizes the default return payload. It signals a routing relationship to bulk operations but never names the sibling tools (gmail_get_message, gmail_get_thread, gmail_bulk_export) it should be chosen over.

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?

Gives conditional guidance for the format parameter ("Set format='ids' for the lighter ID-only response... useful for piping to bulk ops"), which implies a workflow but not a tool-selection rule. There is no explicit when-to-use-this-vs-alternatives statement for the search itself.

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