Skip to main content
Glama

Search Gmail Messages

search_gmail_messages
Read-onlyIdempotent

Searches Gmail messages with standard search operators, returning message and thread IDs with direct links. Supports pagination for large result sets.

Instructions

Searches messages in a user's Gmail account based on a query. Returns both Message IDs and Thread IDs for each found message, along with Gmail web interface links for manual verification. Supports pagination via page_token parameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query. Supports standard Gmail search operators.
user_google_emailYesThe user's Google email address. Required.
page_sizeNoThe maximum number of messages to return. Defaults to 10.
page_tokenNoToken for retrieving the next page of results. Use the next_page_token from a previous response.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare the tool as readOnly, destructiveFalse, idempotent, and openWorld. The description adds value by specifying the return format (Message IDs, Thread IDs, Gmail links) and pagination support, which are beyond the 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, front-loaded with the main purpose, followed by output details and pagination note. Every sentence is necessary and no waste.

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?

With an output schema existing, the description provides sufficient context: it states what is returned (IDs, links) and that pagination is supported. It could mention that it does not return full message content, but that is implied.

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 coverage is 100%, so parameters are well-described there. The description mentions pagination via page_token, but does not add new semantic details beyond what the schema already provides. 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 it searches messages in a user's Gmail account using a query. The verb 'searches' and resource 'messages' are specific, and the tool name includes 'gmail', distinguishing it from sibling search tools like 'search_messages'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide explicit guidance on when to use this tool versus alternatives such as 'get_gmail_message_content' or other search tools. No when-to-use or when-not-to-use instructions are given.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chadvdwww-hash/worksuite-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server