Skip to main content
Glama
A1-x-Tech

A1 Gmail MCP

Search and list threads

list_threads
Read-onlyIdempotent

Search Gmail conversations using query or label filters, returning thread IDs and latest-message snippets for triaging an inbox or finding a discussion to join.

Instructions

Searches conversations (threads) with the same Gmail query syntax as list_messages and returns id, snippet (of the latest message) and historyId per thread. Use this instead of list_messages when the unit of work is a conversation — triaging an inbox, finding a discussion to reply into. Filter with query and/or label_ids; paginate with page_token from nextPageToken (page_size max 500). Read the full conversation with get_thread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoGmail query syntax, e.g. "from:amy@example.com is:unread newer_than:7d has:attachment subject:invoice". Same operators as the Gmail search box.
label_idsNoOnly threads carrying ALL of these label ids (see list_labels).
page_sizeNoThreads per page (1..500, API default 100).
page_tokenNonextPageToken from the previous page.
include_spam_trashNoAlso search SPAM and TRASH (default false).
Behavior4/5

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

The annotations already establish read-only, idempotent, and non-destructive behavior, so the description doesn't need to repeat that. It adds value beyond annotations by specifying that the snippet comes from the latest message, how pagination works, and that the same Gmail query syntax applies.

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?

Three sentences, each with a distinct job: what the tool returns, when to choose it over list_messages, and how to filter/paginate/follow up. No filler or repetition.

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?

Given there is no output schema, the description names the per-thread return fields and points to get_thread for full content. It doesn't mention include_spam_trash or default ordering, but those are fully covered by the schema and are not essential to tool selection or invocation.

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 query, label_ids, page_size, page_token, and include_spam_trash are all fully documented in the schema. The description only restates filtering and pagination at a high level and adds no parameter-level meaning beyond what the schema already provides.

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 ('Searches'), a clear resource ('conversations (threads)'), and the exact return payload (id, snippet, historyId). It also distinguishes itself from list_messages by naming the different unit of work, so an agent can tell them apart immediately.

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

Usage Guidelines5/5

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

Explicitly says 'Use this instead of list_messages when the unit of work is a conversation' and gives concrete examples like triaging an inbox or finding a discussion to reply into. It also points to get_thread for full conversation content and describes pagination mechanics.

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

Install Server

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/A1-x-Tech/mcp-google-gmail'

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