Skip to main content
Glama

mailroom_search

Read-onlyIdempotent

Search or list messages in a connected mailbox using Gmail query syntax, Microsoft 365 KQL, or IMAP filters, with folder, date, unread, and result-limit options.

Instructions

Search or list messages in a connected mailbox. Gmail accepts Gmail query syntax (from:x newer_than:7d has:attachment); Microsoft 365 accepts KQL; other IMAP servers accept from:, to:, subject: and free text.

Input Schema

NameRequiredDescriptionDefault
limitNoMessages to return (max 100, default 20).
queryNoSearch text. Leave empty to list the newest messages.
sinceNoOnly messages after this ISO date, or a shorthand like 7d, 36h, 2w.
folderNoFolder: inbox (default), sent, drafts, trash, junk, archive, all, or a folder name.
accountNoWhich connected mailbox to use (its label from mailroom_accounts). Optional when only one is connected or a default is saved in memory.
unread_onlyNoOnly unread messages (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld/non-destructive, so safety is covered. The description adds genuinely non-obvious behavior: the accepted query dialect depends on the backend (Gmail syntax vs KQL vs plain IMAP prefixes), which prevents malformed queries. It doesn't mention result caps or paging beyond what the schema's limit field states.

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 action front-loaded and provider-specific syntax examples packed into the second sentence. Every clause carries actionable 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?

For a read-only, no-output-schema search tool with six fully documented optional parameters, the description supplies the one thing the schema can't: provider-dependent query language. Minor gap in not indicating what a result entry contains, but annotations and schema carry the rest.

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 coverage is 100%, so baseline is 3, but the description adds real semantic value by specifying which query syntax is valid per provider — something the generic 'Search text' schema field cannot convey. Other parameters (since, folder, unread_only) are left entirely to the schema.

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 pair ('search or list') and resource ('messages in a connected mailbox'), making the scope clear enough to distinguish it from mailroom_read (single message) and mailroom_accounts (mailbox listing). An agent can decide from the first clause alone.

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 is implied by the verb 'search or list,' and the dialect note implies free-text listing when no query is given, but the description never states when to prefer this over mailroom_read or what to do when a search returns nothing. No explicit alternatives or exclusions are named.

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

Deploy Server

Other Tools