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

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