Skip to main content
Glama
mcp-z

@mcp-z/mcp-gmail

by mcp-z

message-search

Search Gmail messages with structured filters for sender, recipient, subject, date, labels, and more. Select specific fields to retrieve tailored results.

Instructions

Search Gmail messages using structured query objects with flexible field selection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoStructured query object or JSON string for filtering messages. Use query-syntax prompt for reference and rawGmailQuery for Gmail syntax.
shapeNoResponse shape: objects (keyed) or arrays (columnar, matching fields order)objects
fieldsNoComma-separated fields to return. Omit for all fields. Available: id, threadId, subject, from, fromName, to, cc, bcc, date, snippet, body, isRead, isImportant, hasAttachments, attachmentCount, labelIds, folderName
pageSizeNoNumber of items per page (default: 50, max: 1000). Accepts numbers or numeric strings.
pageTokenNoToken for retrieving the next page of results (gmail format). Omit for first page.
contentTypeNoFormat for body content: text extracts plain text, html preserves HTML structuretext
excludeThreadHistoryNoWhen true, removes quoted thread history from body content

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations present, the description carries the burden of behavioral disclosure. 'Search' clearly implies a read-only operation, which is useful context. However, the description does not disclose caveats such as the rawGmailQuery bypassing schema validation, response pagination behavior, or that messages are not modified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence with no filler, and it front-loads the core action ('Search Gmail messages'). It is effective for a surface-level understanding, though it leaves room for more decision-useful detail.

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

Completeness3/5

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

The schema is rich and an output schema exists, so those cover invocation and return details. The description itself is thin for a tool of this complexity: it doesn't explain when to use this search tool versus message-get, and it omits any mention of raw Gmail query support or the relationship to other Gmail tools.

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 description coverage is 100%, so the schema already documents all seven parameters thoroughly. The tool description adds only a high-level mention of structured query objects and field selection, which is helpful but not necessary for parameter-level understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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, which distinguishes it from siblings like message-get, message-send, and labels-list. It also mentions structured query objects and flexible field selection, giving a sense of the tool's unique capability. It falls short of a 5 because it doesn't explicitly contrast itself with message-get or other retrieval tools.

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 verb 'Search' implies when to use this tool, but the description provides no explicit guidance on when to prefer it over alternatives like message-get or messages-export-csv. No exclusions, preconditions, or fallback recommendations are given.

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

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