Skip to main content
Glama
psdgator

Multi Gmail Account MCP

by psdgator

Search emails (one or many accounts)

search_emails
Read-only

Search emails across all connected Gmail and IMAP accounts using query syntax, merging results newest-first with each tagged by account.

Instructions

Search mail with Gmail query syntax (from:, to:, subject:, is:unread, has:attachment, after:2026/10/01, newer_than:7d, label:, in:inbox ...). Searches ALL connected accounts by default and merges the results newest-first, each tagged with its account; the same email found in several accounts is shown once (see "alsoIn"). Pass "account" to narrow it. Returns headers + snippet; use read_email for the full body. IMAP accounts support the common operators.

Input Schema

NameRequiredDescriptionDefault
queryYesSearch query, e.g. "is:unread newer_than:2d" or "from:dhl.com has:attachment". Use "" for latest mail.
accountNoWhich mailbox(es): an alias, an email address, a list of them, or "all". Omit to use ALL connected accounts. No accounts connected yet.
pageTokenNoContinue a previous single-account search (from nextPageTokens).
maxResultsNoMax results PER ACCOUNT (default 10).
includeSpamTrashNoAlso search Spam and Trash (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, so the safety profile is covered. The description still adds genuinely useful behavior beyond that: cross-account merging order, deduplication of the same email across accounts via "alsoIn", per-account result counting, and the IMAP operator limitation. However, it never mentions pagination mechanics (nextPageTokens) or rate/volume limits, so it adds context but not a full behavioral picture.

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 sentences, front-loaded with the query syntax and then the multi-account default, with no filler. The parenthetical operator list is long but directly usable by an agent composing a query, so every element earns its place.

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?

There is no output schema, yet the description compensates by describing the return shape (headers + snippet, account tag, "alsoIn" dedup marker) and routes to read_email for full bodies. For a 5-parameter read tool with full annotation coverage, 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.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3; the description earns an extra point by explaining the interaction between "account" narrowing and the default all-accounts merge, and by hinting that maxResults applies per account while pageToken is single-account only. It doesn't add syntax detail for account aliases or the empty-query case, which stay schema-side.

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 (search) and resource (mail/emails), spells out the query syntax with concrete operators, and distinguishes itself from read_email by scope of return (headers + snippet vs. full body). An agent can tell exactly what this does and how it differs from read_email/read_thread without opening any schema.

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

Usage Guidelines5/5

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

Gives the default behavior (searches ALL connected accounts, merged newest-first), the narrowing condition (pass "account" to target one mailbox), and an explicit alternative with its trigger (use read_email for the full body). The IMAP operator caveat further sets expectations about when query features may not apply.

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