Skip to main content
Glama
gmail-mcp

gmail-mcp

gmail_search_emails

Search Gmail messages with query syntax to locate emails by sender, subject, label, date, attachment, or read status. Set max_results to limit returned matches.

Instructions

Search emails using Gmail query syntax.

Args: query: Gmail search query. Examples: - "from:someone@example.com" - "subject:meeting" - "is:unread" - "has:attachment" - "after:2024/01/01" - "label:work" - "in:sent" - Combine: "from:boss@company.com is:unread after:2024/01/01" max_results: Maximum number of results to return (default: 20)

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": {
      "query": "<query>"
    },
    "name": "gmail_search_emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
max_resultsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. Search implies a safe read operation, and the max_results default of 20 is disclosed, which is useful. But it does not state the search scope (all mail including spam/trash vs. inbox only), whether results are paginated or there is a hard cap, or ordering of results, leaving meaningful behavioral gaps.

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 purpose sentence is front-loaded and the remaining content is a compact args block with concrete examples. The example list is slightly long but every entry illustrates a distinct operator class, so it earns its space. Little wasted wording overall.

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?

This is a simple two-parameter read tool, and an output schema exists so return values need not be explained. Given that, the description covers the key input semantics and the default well. It falls just short of complete because scope and result-limit behavior are unstated, which matters for an agent deciding between searching and listing.

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% and the schema only offers bare titles 'Query' and 'Max Results', so the description must compensate. It does so well for query, enumerating concrete Gmail operator examples (from:, subject:, is:unread, has:attachment, after:, label:, in:sent) including a combined example, and it restates the max_results default of 20. The only shortfall is the absence of any upper bound or validation note for max_results.

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 states a specific verb and resource: 'Search emails using Gmail query syntax.' That is unambiguous and an agent can tell it apart from mutation siblings such as gmail_delete_email or gmail_create_draft. It stops short of naming a specific read sibling (gmail_read_email, gmail_list_inbox) as a distinction, so it is clear but not maximally differentiated.

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?

Usage is implied by the word 'search' and by the query examples, which convey the kind of filtering this tool is for. However, the description never says when to choose this over gmail_read_email for a single message or gmail_list_inbox for a plain listing, and it gives no exclusions or prerequisites. An agent can infer the use case but must reason about alternatives on its own.

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