Skip to main content
Glama

gmail_messages_list

Read-onlyIdempotent

List messages in a Gmail mailbox by query, label, or page, including SPAM and TRASH options. Use it to find or review emails matching search terms before acting on them.

Instructions

List messages in the user's mailbox.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoOnly return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid:<somemsgid@example.com> is:unread". Parameter cannot be used when accessing the api using the gmail.metadata scope.
userIdNoThe user's email address. The special value 'me' can be used to indicate the authenticated user.me
labelIdsNoOnly return messages with labels that match all of the specified label IDs. Messages in a thread might have labels that other messages in the same thread don't have.
pageTokenNoPage token to retrieve a specific page of results in the list.
maxResultsNoMaximum number of messages to return. This field defaults to 100. The maximum allowed value for this field is 500.
includeSpamTrashNoInclude messages from SPAM and TRASH in the results.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the safety profile is covered structurally. The description adds nothing beyond that: it does not mention pagination, the default/max result caps, or how SPAM/TRASH are excluded by default, all of which materially affect behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence is front-loaded and waste-free, but its brevity here reflects under-specification rather than disciplined conciseness for a six-parameter list tool.

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?

For a read-only list tool with full schema documentation and annotations covering safety, the essentials are present. It is incomplete in that it omits pagination/result-cap behavior and return shape, but with no output schema and a fully documented input schema, the omission is a moderate rather than severe gap.

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% and every one of the six parameters has a detailed description in the schema, including query syntax, page tokens, and maxResults bounds. The description adds no parameter meaning beyond the schema, so the baseline of 3 applies.

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 ('List messages') and the scope ('user's mailbox'), which is clear enough for an agent to know it retrieves Gmail messages. However, it offers no differentiation from the sibling gmail_threads_list, which is also a Gmail listing operation, so the agent must infer the distinction from the name alone.

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

Usage Guidelines2/5

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

The description contains no when-to-use, when-not-to-use, or alternative-tool guidance. Nothing tells the agent to prefer this over gmail_threads_list or when a query-based search (q) is the right approach versus fetching everything.

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