Skip to main content
Glama

gmail_search_messages

Search Gmail messages using filters such as sender, subject, date range, attachment status, and unread flag. Find specific emails quickly based on your criteria.

Instructions

Search Gmail messages with specific criteria.

Args: sender: Filter by sender email subject: Filter by subject keywords after_date: Filter messages after date (YYYY/MM/DD format) before_date: Filter messages before date (YYYY/MM/DD format) has_attachment: Filter messages with attachments is_unread: Filter unread messages max_results: Maximum number of messages to return (1-100)

Returns: Dictionary with search results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
senderNo
subjectNo
is_unreadNo
after_dateNo
before_dateNo
max_resultsNo
has_attachmentNo
Behavior2/5

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

With no annotations, the description must fully disclose behavior. It only states 'Returns: Dictionary with search results', lacking details on return structure, pagination, rate limits, or authorization requirements. This is insufficient for a search tool.

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 efficiently structured with a short intro, a bulleted Args list, and a Returns line. Every sentence adds value, and the format is easy to parse. No redundant or misleading content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 7 parameters and no output schema, the description does not fully describe the return value (vague 'Dictionary with search results'), no mention of error handling, pagination, or result limits beyond max_results. Missing critical context for a robust search tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description's Args section provides essential meaning for all 7 parameters. Each parameter gets a brief but clear explanation (e.g., 'Filter by sender email', 'YYYY/MM/DD format'). While more detail could be provided, it compensates well for the schema gap.

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 with specific criteria. This verb+resource combination is distinct from sibling tools like gmail_list_messages (likely listing without advanced filters) and gmail_get_message (retrieving by ID).

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?

No guidance is provided on when to use this tool versus alternatives like gmail_list_messages or gmail_get_stats. The description does not mention any prerequisites, exclusions, or comparison with sibling tools.

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/ampcome-mcps/gmail-mcp'

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