Skip to main content
Glama

gmail_search

Read-only

Search Gmail using Gmail's query syntax (from:, to:, has:attachment, newer_than:7d, is:unread). Returns message IDs and snippets, enabling quick identification of relevant emails before fetching full bodies.

Instructions

Search the mailbox with Gmail's own query syntax (from:, to:, subject:, has:attachment, newer_than:7d, is:unread). Returns message ids and snippets; use gmail_get_message for a full body.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYese.g. "from:sarah newer_than:30d has:attachment"
maxNo
Install Server

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld; the description adds a concrete behavioral boundary: it returns message IDs and snippets, not full bodies. This complements rather than contradicts 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?

Two sentences deliver the query syntax, return shape, and sibling routing with no filler. Every phrase contributes and the main behavior is front-loaded.

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?

For a read-only search tool, the definition covers query syntax, return shape, and where to get full bodies. The only real gap is not stating that max limits the number of results, though the schema's default/min/max constraints make this a minor issue.

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 description significantly enriches q by giving usable Gmail operators such as from:, has:attachment, and newer_than:7d. However, schema coverage is 50% and max has no description, so the max parameter's meaning is left mostly to inference.

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?

States a specific verb and resource: 'Search the mailbox' with Gmail's own query syntax. It also distinguishes itself from gmail_get_message by noting it returns only IDs and snippets, so an agent knows the boundary.

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

Usage Guidelines4/5

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

Gives clear context for when to search and explicitly routes full-body retrieval to gmail_get_message. It does not enumerate exclusions for every sibling, but the main alternative is named.

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

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/navidmoazzez/google-workspace-mcp'

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