Skip to main content
Glama

search_messages

Read-onlyIdempotent

Search message summaries using explicit filters. Use nextCursor for more results; query is plain text, not Gmail search syntax.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoInclusive received-time lower bound.
limitNoMaximum summaries returned per page.
queryNoLiteral substring in subject, sender or indexed text; not a search DSL.
beforeNoExclusive received-time upper bound.
cursorNoOpaque nextCursor from the previous page with the same filters.
folderNoExact existing IMAP folder name.
unreadNoTrue selects unread messages; false selects read messages.
flaggedNoFilter by flagged state.
refreshNoindexed reads the index; bounded refreshes one specified folder batch first.indexed
threadIdNoOpaque server-provided thread identifier.
mailboxIdYesEPST mailbox UUID, not an email address or RFC Message-ID.
hasAttachmentsNoFilter by attachment presence.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds behavioral context by noting the tool returns summaries (not full messages) and supports pagination via nextCursor, which is useful beyond the annotations. It also clarifies the query is plain text, reducing ambiguity.

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 with no redundancy: it front-loads the purpose and then adds two actionable usage tips (pagination and query syntax). Every sentence earns its place, and the structure is clean and efficient.

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?

Given the schema covers all parameters and an output schema exists (not shown but present), the description provides sufficient context for an agent to use pagination correctly and understand query semantics. It doesn't explain cursor constraints (e.g., must use same filters), but the schema's cursor description covers that. For a search tool with rich schema, this description is complete enough.

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 the schema already documents all 12 parameters. The description adds little to parameter semantics; it only mentions nextCursor for pagination (which is an output field, not a parameter) and reiterates that query is plain text (already in the schema as 'not a search DSL'). Thus, the description provides minimal additional meaning over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 message summaries using explicit filters.' It clearly indicates this is a search operation on message summaries, which distinguishes it from get_message (retrieving a single message) or list_drafts (listing drafts). However, it doesn't explicitly name sibling tools or explain when to choose this over them, so it falls short of full differentiation.

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?

The description gives pagination guidance ('Use nextCursor for more results') and clarifies query format ('query is plain text, not Gmail search syntax'), which helps an agent use the tool correctly. It does not, however, provide explicit guidance on when to use this tool versus alternatives like list_drafts or get_message, leaving selection to inference.

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