Skip to main content
Glama

list_emails

Retrieve emails from your Gmail account with filtering options. Use this tool to view messages from specific labels like INBOX, SENT, or STARRED with customizable result limits.

Instructions

    List emails from the user's mailbox.
    
    This tool retrieves a list of emails from the specified label in the user's
    Gmail account, with basic information about each email.
    
    Prerequisites:
    - The user must be authenticated. Check auth://status resource first.
    - If not authenticated, guide the user through the authentication process.
    
    Args:
        max_results (int, optional): Maximum number of emails to return. Defaults to 10.
        label (str, optional): The label to filter by. Defaults to "INBOX".
            Common labels: "INBOX", "SENT", "DRAFT", "TRASH", "SPAM", "STARRED"
        
    Returns:
        Dict[str, Any]: The list of emails including:
            - emails: List of email objects with basic information and links
            - next_page_token: Token for pagination (if applicable)
            
    Example usage:
    1. First check authentication: access auth://status resource
    2. If authenticated, call list_emails(max_results=5, label="INBOX")
    3. If not authenticated, guide user to authenticate first
    4. Always include the email_link when discussing specific emails with the user
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_resultsNo
labelNoINBOX
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: authentication requirements, pagination behavior (mentions next_page_token), and what information is returned (basic information about each email). It doesn't mention rate limits, error conditions, or whether this is a read-only operation (though 'list' implies it), preventing a perfect score.

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 description is well-structured with clear sections (purpose, prerequisites, args, returns, example usage) and every sentence adds value. It could be slightly more concise by combining some of the example usage steps, but overall it's efficiently organized with no wasted text.

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 the tool's moderate complexity (2 parameters, no output schema, no annotations), the description provides comprehensive context: purpose, prerequisites, parameter details, return format, and usage examples. The only minor gap is lack of explicit mention that this is a read-only operation (though implied by 'list'), preventing a perfect score.

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

Parameters5/5

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

The description adds significant value beyond the input schema, which has 0% description coverage. It explains both parameters thoroughly: max_results specifies the maximum number of emails with a default value, and label provides the filtering purpose with default value and common examples (INBOX, SENT, etc.). This fully compensates for the schema's lack of descriptions.

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 clearly states the tool's purpose: 'List emails from the user's mailbox' and 'retrieves a list of emails from the specified label in the user's Gmail account'. It specifies the resource (emails) and verb (list/retrieve) with context about the source (Gmail account). However, it doesn't explicitly differentiate from sibling tools like 'search_emails' or 'get_email', which is why it doesn't reach a score of 5.

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?

The description provides explicit usage guidelines with prerequisites (authentication required, check auth://status first), step-by-step instructions for when to use it (including alternatives like guiding authentication if not authenticated), and context about when to include email links. It clearly distinguishes this from authentication tools and provides concrete usage scenarios.

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/bastienchabal/gmail-mcp'

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