Skip to main content
Glama

AIsa Agent Mail

Search All Threads

get_agentmail_threads_search
Read-onlyIdempotent

Full-text search over threads in every inbox in the account. Returns count, limit, next_page_token and threads; page with next_page_token. Same fields as get_agentmail_threads, which is the one to use for everything in date order. This is the organization-wide view spanning every inbox in the account. Every AIsa caller shares one AgentMail account, so this reaches inboxes other callers created; the inbox-scoped twin get_agentmail_inbox_threads_search is the one to use when a single inbox is meant.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesFull-text search query. Matched against the sender, recipients, and subject (substring) and the message body (tokenized full text).
afterNoTimestamp after which to filter by.
limitNoLimit of number of items returned.
beforeNoTimestamp before which to filter by.
page_tokenNoPage token for pagination.
AuthorizationYesBearer authentication

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark the operation as read-only and idempotent. The description adds valuable behavioral context: the returned response fields, pagination behavior via next_page_token, and the important shared-account consequence that the search reaches inboxes created by other callers.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action and return shape. It is slightly repetitive ("every inbox in the account" and "organization-wide view spanning every inbox"), but every sentence adds useful routing or behavioral context.

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?

The description covers the tool's scope, response fields, pagination behavior, and sibling-tool distinctions. Combined with the rich schema and annotations, an agent has everything it needs to invoke the tool correctly.

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?

The input schema already provides full descriptions for all parameters, including the q query semantics and pagination token. The tool description adds little parameter-specific detail beyond mentioning pagination, so the schema-coverage baseline of 3 is appropriate.

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 clearly states the tool performs full-text search over threads in every inbox in the account. It also distinguishes itself from sibling tools like get_agentmail_threads and get_agentmail_inbox_threads_search, making selection unambiguous.

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?

Explicitly names when to use this tool versus alternatives: get_agentmail_threads for date-ordered listing, get_agentmail_inbox_threads_search for single-inbox searches, and this tool for organization-wide search across all inboxes. This leaves no ambiguity about 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources