Skip to main content
Glama

gmail_search

Search a specified authorized Gmail account using Gmail query syntax, such as unread messages from a sender, and return up to a set number of matching messages.

Instructions

Search Gmail for an account using Gmail query syntax (e.g. 'from:boss is:unread newer_than:7d').

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "account": "<account>",
      "query": "<query>"
    },
    "name": "gmail_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesGmail search query.
accountYesAccount email (must be authorized).
max_resultsNoMax messages to return (1-50, default 10).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It does not state that this is a read-only operation, how results are ordered or capped (max_results appears only in the schema), whether pagination or tokens exist, or that unauthorized accounts fail — all material for a search call with no output schema.

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?

A single sentence, front-loaded with verb and resource, with the example placed where it disambiguates rather than padding. It is tight and wastes no words, though it is terse enough that it omits rather than over-explains.

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?

With three parameters and no annotations or output schema, the definition covers the query dialect but leaves the agent to infer safety profile, result shape, and pagination behavior. It is adequate to invoke the tool correctly given full schema coverage, but not complete for an unannotated, no-output-schema 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?

Schema description coverage is 100%, so the schema already documents account, query, and max_results bounds. The description's inline query example adds a little semantic value about the dialect of the query string, but it does not explain account selection or result-limit behavior beyond what the schema provides, so baseline 3 is right.

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 and resource ('Search Gmail for an account') and scopes it to Gmail query syntax with a concrete example, so an agent can tell this is a query-driven message search rather than a thread fetch or draft creation. It stops short of explicitly contrasting with siblings like gmail_get_thread, so it lands at 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 example query ('from:boss is:unread newer_than:7d') implicitly shows the intended calling pattern, which is useful guidance. However, there is no explicit statement of when to prefer this over gmail_get_thread for a single conversation, nor any exclusion or prerequisite beyond the schema's 'must be authorized' note.

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