Skip to main content
Glama

gmail_search_many

Search Gmail messages across multiple accounts at once. Results are grouped by account for easy comparison.

Instructions

Search Gmail messages across multiple configured accounts. Results are grouped by account. Results do not include attachment info (fetched with format: metadata, which never populates the MIME parts tree) — use gmail_read_message on a specific message to see its attachments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesGmail search query, e.g. from:alice@example.com newer_than:7d.
accountsNoConfigured account aliases to search. If omitted, all configured accounts are searched.
maxResultsPerAccountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It explicitly states a key limitation: results are fetched with format:metadata, which never populates the MIME parts tree, so attachments are not included. It also notes results are grouped by account. This goes beyond a generic 'search' and gives the agent important operational context, though it omits details like rate limits or response fields.

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 description is two sentences, front-loaded with the main purpose. The second sentence delivers a critical behavioral caveat and a direct pointer to the appropriate sibling tool. There is no wasted wording, and the structure is efficient and easy to parse.

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?

Without an output schema and annotations, the description must convey enough for the agent to know what to expect. It tells the agent results are grouped by account and that attachments are excluded, and where to go for attachments. It does not describe the result fields (e.g., message IDs, snippets) but for a multi-account search tool this is acceptable. The guide to gmail_read_message fills a key gap. Overall, it is fairly complete for the tool's complexity.

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 coverage is 67%: query and accounts have descriptions, but maxResultsPerAccount does not. The tool description adds no parameter-specific meaning beyond the schema, and does not compensate for the undocumented parameter. It does not explain how maxResultsPerAccount affects behavior or results, leaving the agent to rely on the schema's default/min/max. This meets the baseline for partial schema coverage but adds no additional value.

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 states a specific verb and resource: 'Search Gmail messages across multiple configured accounts.' It distinguishes itself from gmail_search (single-account) by emphasizing the multi-account scope, and from gmail_read_message by noting it does not return attachments. This makes the purpose unambiguous and clearly differentiated from siblings.

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?

The description provides clear guidance on when to use this tool versus gmail_read_message: if you need attachment info, use the latter. It implies when to use this tool (when searching multiple accounts) versus single-account search, though it does not explicitly name gmail_search as an alternative for single-account queries. The indication that results are grouped by account clarifies the intended use case.

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