Skip to main content
Glama

search_emails_batch

Read-only

Search up to 20 email accounts with a single portable query, returning a result group per account for quick comparison.

Instructions

Search up to 20 accounts with one portable query and return one result group per account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNo
fromNo
readNo
afterNoYYYY-MM-DD received date, inclusive in UTC
queryYesTyped portable search syntax
beforeNoYYYY-MM-DD received date, exclusive in UTC
folderNo
starredNo
subjectNo
accountsYes
pageSizeNoDefaults to 25
hasAttachmentNo
includeSnippetNoRequest or suppress message previews
includeSearchContextNoInclude a match-centered body excerpt; requires a portable text query

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.10.0
    • addedInput schema / properties / includeSearchContext
      Added value: +{
      +  "description": "Include a match-centered body excerpt; requires a portable text query",
      +  "type": "boolean"
      +}
  2. Addedv0.9.0

TDQS

A3.9/5.0
Behavior4/5

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

With readOnlyHint true already declared, the description adds useful behavioral context: 'portable query' indicates query syntax portability across accounts, and 'one result group per account' explains the output grouping. It does not cover pagination or error behavior, but the annotation lowers the bar for safety disclosure.

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?

A single, front-loaded sentence with zero filler words. It communicates the essential scope, input, and output grouping in the most efficient way possible.

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

Completeness2/5

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

Given 14 parameters, no output schema, and only 43% schema description coverage, the description is too sparse to provide complete guidance. It omits parameter details, return value structure, pagination semantics, and edge-case behavior, leaving an agent to guess for non-trivial use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

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

Schema description coverage is only 43%, leaving parameters like to, from, read, subject, starred, and hasAttachment without descriptions in either the schema or the tool description. The description only mentions 'portable query' without defining its syntax, so it does not compensate for the low coverage.

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 ('Search'), resource ('emails'), and scope ('up to 20 accounts'), and emphasizes the batch nature with 'one result group per account'. This clearly distinguishes it from the sibling search_emails, which presumably handles a single account.

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 phrase 'Search up to 20 accounts' strongly implies the multi-account batch scenario, making it obvious when to select this over single-account tools. It does not explicitly name alternatives or exclusion cases, but the context is clear enough for most agents.

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