Skip to main content
Glama

gmail_search

Find Gmail messages matching a query and get IDs/thread IDs, or enrich results with sender, subject, date, and snippet.

Instructions

Search Gmail messages with a Gmail query (same syntax as the Gmail search box, e.g. label:finance after:2026/01/01). Returns only id/threadId per hit by default (ids-only, quota-safe). Set enrich: true to add From/Subject/Date/snippet — this costs one extra messages.get request per hit, bounded by concurrency (default 4). limit defaults to 50 when omitted; pass 0 explicitly to auto-paginate up to a hard cap (10000) — expensive combined with enrich: true, use deliberately. Read-only. Mirrors omni-dev gmail search. Output is YAML.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results. Defaults to 50 when omitted; `0` explicitly means fetch every match up to the hard cap (10000).
queryYesGmail search query, same syntax as the Gmail search box (e.g. `label:finance after:2026/01/01`). Required.
enrichNoWhen `true`, enrich each hit with From/Subject/Date/snippet via one extra `messages.get` request per hit. Defaults to `false` (ids-only, the quota-safe default — `messages.get` costs 5 units against Gmail's 250 units/user/second budget).
accountNoSelects a named Gmail account instead of the ambient `--account`/`OMNI_DEV_GMAIL_ACCOUNT` resolution — e.g. `work`. Omit to use the resolved default account (or the legacy single-account credentials, if no named accounts are configured). Call `gmail_account_list` to discover configured names.
concurrencyNoBounds concurrent `messages.get` calls when `enrich` is true (has no effect otherwise). Defaults to 4, clamped to 1-50 regardless of what is requested — Gmail's quota is 250 units/user/second and `messages.get` costs 5 units, so a higher value could burst past it.
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: read-only status, default ids-only behavior, quota implications of enrich, concurrency bounds, pagination defaults, hard cap of 10000, and YAML output format. This is exemplary for a tool with zero annotation coverage.

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?

Four dense sentences with no filler. Core action and query syntax are front-loaded, followed by return mode, enrichment cost, pagination, and output format. Every sentence adds operational value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a moderately complex search tool with no output schema, the description is complete: it defines the input query, default and enriched return shapes, output format, pagination behavior, cost/performance tradeoffs, and safety profile. Nothing an agent needs to invoke it correctly is missing.

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 baseline is 3. The description reinforces key semantics like limit defaulting to 50, the 0 auto-pagination behavior, enrich cost, and concurrency default, but most of this is already present in the schema. It adds marginal framing around quota-safety and deliberate usage but does not materially expand on the parameter schema.

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?

The description clearly identifies a specific verb and resource: search Gmail messages using Gmail query syntax. It distinguishes itself from message/thread read tools by emphasizing the query/list nature and the default ids-only return, though it doesn't explicitly name a sibling alternative.

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 context is strongly implied: this is the tool for searching Gmail inboxes with Gmail query syntax, and it explains when to enable enrich. However, it never explicitly contrasts with alternatives like gmail_message_read or says when not to use this tool, so the guidance is mostly implicit rather than explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rust-works/omni-dev'

If you have feedback or need assistance with the MCP directory API, please join our Discord server