Skip to main content
Glama
EveryInc

google-workspace-mcp-server

by EveryInc

List Gmail Messages

gmail_list_messages
Read-onlyIdempotent

List Gmail messages filtered by search query, labels, and pagination, with output as markdown or JSON.

Instructions

List messages from Gmail with optional search filters.

Args:

  • query (string, optional): Gmail search query (e.g., 'from:boss@company.com is:unread', 'subject:invoice after:2024/01/01')

  • max_results (number): Maximum messages to return, 1-100 (default: 10)

  • label_ids (string[]): Filter by labels like 'INBOX', 'UNREAD', 'STARRED', 'SENT'

  • page_token (string, optional): Token for pagination

  • response_format ('markdown' | 'json'): Output format (default: 'markdown')

Returns: List of message summaries with ID, subject, from, date, and snippet.

Examples:

  • Unread emails: query="is:unread"

  • From specific sender: query="from:notifications@github.com"

  • Recent with attachment: query="has:attachment newer_than:7d"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoGmail search query (e.g., 'from:someone@example.com is:unread', 'subject:invoice')
max_resultsNoMaximum messages to return (1-100)
label_idsNoFilter by label IDs (e.g., ['INBOX', 'UNREAD', 'STARRED'])
page_tokenNoToken for pagination to retrieve the next page of results
response_formatNoOutput format: 'markdown' for human-readable or 'json' for structured datamarkdown
Behavior4/5

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

Annotations already indicate a safe, read-only, idempotent operation. The description adds behavioral context by detailing the return format, pagination via page_token, and output format options, going beyond what annotations provide.

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?

The description is concise and well-structured: a clear introductory sentence, a parameter list, a return description, and relevant examples. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description adequately covers return fields (subject, from, date, snippet), all parameters with examples, and pagination. It provides sufficient information for an agent to use the tool effectively without missing critical details.

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?

With 100% schema description coverage, the schema already documents parameters. The description adds significant value with practical examples for query usage and clarification of response_format, enhancing understanding beyond the schema.

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?

The description clearly states 'List messages from Gmail with optional search filters,' specifying the verb, resource, and scope. It effectively distinguishes from sibling tools like gmail_get_message and gmail_list_threads by focusing on listing messages with filters.

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?

The description provides clear context for when to use this tool (listing messages with filters) and includes examples. However, it does not explicitly mention when not to use it or reference alternatives like gmail_get_message for single message retrieval.

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/EveryInc/google-workspace-mcp-server'

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