Skip to main content
Glama

Gmail: List messages

gmail_list_messages
Read-only

List Gmail messages with optional search queries, label filters, and pagination, returning message and thread IDs so you can read selected messages next.

Instructions

[UNIFIED] List Gmail messages. Optionally filter with a Gmail search query (q), label ids, and paginate. Returns message ids + thread ids; use gmail_get_message to read a message's content.

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": {
      "site": "<site>"
    },
    "name": "gmail_list_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNo
siteYes
label_idsNo
page_tokenNo
max_resultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only cover readOnlyHint=true, and the description usefully adds the return shape (message ids + thread ids) and the existence of pagination via page_token. It does not mention rate limits, quota, or result ordering, but for a read-only list tool the added context is solid.

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 short sentences, front-loaded with purpose, then filters/pagination, then the hand-off to the sibling. Nothing is redundant.

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?

Return values and the downstream tool are covered, which is the main completeness need with no output schema. However, a required "site" parameter that appears nowhere in the description is a real hole an agent must resolve on its own.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry all parameter meaning — and it omits the only required parameter, "site", entirely. It gestures at q (Gmail search syntax), label_ids, and pagination, but leaves max_results semantics and the format of label_ids unexplained.

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 and resource ("List Gmail messages") and immediately distinguishes the tool from gmail_get_message, which reads content. An agent can tell what this returns (ids, not bodies) without opening any schema.

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

Usage Guidelines4/5

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

Explicitly routes content-reading to gmail_get_message, which is the main fork in the sibling set. It does not spell out when to prefer label_ids over q, or when not to use this tool, but the key alternative is named.

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

Deploy Server

Other Tools