Skip to main content
Glama

search_gmail_messages

Search Gmail messages using queries and operators to find specific emails, returning message IDs, thread IDs, and web links for verification.

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?

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: it returns both Message IDs and Thread IDs, provides Gmail web links for manual verification, and supports pagination via page_token. However, it does not mention authentication requirements, rate limits, or error handling, leaving some gaps.

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 front-loaded with the core purpose, followed by key return details and pagination support in three concise sentences. Each sentence adds value without redundancy, making it efficient and well-structured.

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 tool's moderate complexity (search with pagination), no annotations, and an output schema (implied by context signals), the description is largely complete. It covers purpose, return format, and pagination, but could benefit from mentioning authentication or error scenarios to be fully comprehensive.

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 schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema, mentioning pagination support which relates to 'page_token', but does not provide additional syntax or format details. This meets the baseline for high schema coverage.

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 specific action ('Searches messages') and resource ('in a user's Gmail account'), distinguishing it from siblings like 'get_gmail_message_content' (which retrieves content) and 'search_messages' (which appears generic). It explicitly mentions the scope of returning both Message IDs and Thread IDs with web links.

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 implies usage for searching Gmail messages based on queries, but does not explicitly state when to use this tool versus alternatives like 'search_messages' or 'get_gmail_messages_content_batch'. It mentions pagination support, which provides some context for handling large result sets.

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/HuntsDesk/ve-gws'

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