Skip to main content
Glama

Search Gmail Messages

search_gmail_messages
Read-onlyIdempotent

Search Gmail messages using standard Gmail search operators. Returns message IDs, thread IDs, and web interface links for manual 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
Behavior3/5

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

Annotations already indicate readOnlyHint=true and idempotentHint=true, so the description adds value by stating it returns Message IDs, Thread IDs, and web links, and supports pagination. However, it does not disclose rate limits, authentication details, or behavior with large result sets.

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 concise sentences, front-loaded with the core purpose. Each sentence adds essential information: action, return values, and pagination support. No redundant or vague language.

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 presence of an output schema and annotations, the description is fairly complete. It covers returned fields and pagination. It could improve by mentioning query syntax or sorting order, but overall it meets the needs for a search tool.

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?

With 100% schema coverage, the input schema already documents all parameters. The description mentions pagination via page_token but does not add significant meaning beyond the schema descriptions.

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 searches Gmail messages based on a query, specifying the resource (Gmail messages) and action (search). It distinguishes from sibling tools like search_messages (generic) and get_gmail_message_content (retrieval) by mentioning Gmail-specific return fields and pagination.

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 but does not explicitly compare to alternatives like search_custom or search_drive_files. No guidance on when not to use this tool versus other search tools is provided.

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/theolefort-cyber/mcpworkspace'

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