Skip to main content
Glama
thrix

gcloud-workspace-mcp

by thrix

gmail_search

Read-only

Search Gmail messages with Gmail query syntax. Returns message IDs, thread IDs, and pagination tokens for paging through results.

Instructions

Search Gmail messages using Gmail search syntax.

Uses ADC credentials and sends the mandatory quota-project header.

resultSizeEstimate is only an estimate and stops counting at 201. To count matches, page through the results with page_token instead.

Args: query: A Gmail search expression, e.g. "from:alice newer_than:7d". max_results: Maximum number of message ids to return (1-500). page_token: The nextPageToken from a previous call, to fetch the next page.

Returns: A JSON object {messages: [{id, threadId}], nextPageToken, resultSizeEstimate}. nextPageToken is null on the last page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
page_tokenNo
max_resultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds notable behavioral details beyond annotations: the mandatory quota-project header, ADC credential usage, the caveat that resultSizeEstimate stops at 201, and the pagination pattern. That is meaningful non-obvious context, though auth failure modes and rate limits aren't fully addressed.

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?

It's structured with an opening purpose, behavior note, caveat, and clear Args/Returns sections; every sentence carries information. Front-loading the search purpose is good, though the ADC/header sentence could be considered lower-value for an agent.

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?

With 3 parameters at 0% schema coverage, annotations covering safety, and an output schema present, the description provides the necessary parameter and return-field details. It explains resultSizeEstimate limitations and pagination, completing the picture for a search tool, though it could say a bit more about when to use it versus sibling tools.

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?

Schema description coverage is 0% across 3 parameters, so the description must compensate. It does document each parameter: query with an example, max_results with a 1–500 range, and page_token tied to nextPageToken from a previous call. This adds substantial meaning beyond the bare schema, though datetime/rank semantics aren't detailed.

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?

States a specific verb (search) and resource (Gmail messages) and mentions Gmail search syntax, clearly distinguishing it from siblings like gmail_get_message and drive_search. It stops short of comparing directly to sibling tools, which is why it's a 4 rather than 5.

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 by providing query examples and pagination hints, but it never states when to prefer gmail_search over gmail_get_message or gmail_get_thread. An agent can infer intent but must guess at alternatives.

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