Skip to main content
Glama

AIsa Agent Mail

Search Messages

get_agentmail_inbox_messages_search
Read-onlyIdempotent

Full-text search across one inbox's messages. Returns count, limit, next_page_token and messages; page with next_page_token. Same message fields as get_agentmail_inbox_messages, which is the one to use when you want everything in date order rather than a query. Searching conversations instead of individual messages is get_agentmail_inbox_threads_search.

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.
inbox_idYesThe ID of the inbox.
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.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, covering safety. The description adds valuable behavioral context about the return payload (count, limit, next_page_token, messages) and pagination via next_page_token, which goes beyond what annotations provide. No contradictions with annotations.

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 three sentences with no redundancy. It front-loads the core purpose, then mentions return fields and pagination, and finishes with sibling differentiation. Every sentence adds value, making it concise and well-structured.

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?

Given the tool's moderate complexity (7 params, 3 required, output schema present) and that the schema already documents all parameters, the description fully covers the search semantics, pagination, and how to select this tool among siblings. Nothing an agent needs to call it correctly is missing.

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 description coverage is 100%, so all parameters (q, after, before, limit, inbox_id, page_token, Authorization) are fully documented in the schema itself. The tool description does not add extra parameter-level meaning beyond what the schema already provides, so a baseline score 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 across one inbox's messages, with a specific verb and resource. It explicitly distinguishes itself from sibling tools like get_agentmail_inbox_messages (for date-ordered listing) and get_agentmail_inbox_threads_search (for thread-level search), making it unambiguous which tool to choose.

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?

The description provides explicit guidance on when to use this tool versus alternatives: it's for query-based search, while get_agentmail_inbox_messages is for everything in date order, and get_agentmail_inbox_threads_search is for searching conversations. This clear routing eliminates ambiguity.

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