Skip to main content
Glama

check_inbox

Retrieve emails from supported email services (IMAP, MailHog, Mailpit) with filtering options for folder, unread status, sender, and subject.

Instructions

Check inbox via specified email service.

Retrieves emails from the specified service and folder. Supports IMAP-based services, local testing services with web APIs, and service-specific inbox checking.

Args: service: Email service to check. Options: - "default": Default IMAP service (from env vars) - "mailhog": Local MailHog testing service - "mailpit": Local Mailpit testing service - Custom service names that support inbox checking folder: Mail folder name to check. Default: "INBOX". Common folders: - "INBOX": Main inbox folder - "Sent": Sent items folder - "Drafts": Draft messages folder - "Trash": Deleted messages folder Folder names are case-sensitive and provider-specific. limit: Maximum number of emails to return. Default: 10. unread_only: If True, only returns unread emails. Default: False. from_contains: Optional case-insensitive substring filter on From (IMAP scans recent mail). subject_contains: Optional case-insensitive substring filter on Subject.

Returns: Dictionary with service-specific results: { "success": bool, # True if inbox check succeeded "emails": [ # List of email dictionaries { "id": str, # Message ID "subject": str, # Email subject "from": str, # Sender address "date": str, # Email date "read": bool # Read status } ], "count": int, # Number of emails returned "service": str, # Service used "folder": str, # Folder checked "error": str # Error message if success is False }

Examples: # Check default IMAP inbox check_inbox() # Returns: {"success": True, "emails": [...], "count": 10, "service": "default"}

# Check MailHog testing inbox
check_inbox(service="mailhog", limit=20)
# Returns emails from local testing service

# Check unread emails only
check_inbox(unread_only=True, limit=5)

Notes: - Not all services support inbox checking (API/webhook services typically don't) - Local testing services provide web UIs for viewing emails - IMAP services support standard folder names - Results are sorted with most recent first

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serviceNodefault
folderNoINBOX
limitNo
unread_onlyNo
from_containsNo
subject_containsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Despite no annotations, the description fully explains the return format, sorting order (most recent first), and limitations (e.g., non-supporting services). It does not cover authentication or rate limits, but given the tool's simplicity, the disclosure is substantial.

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 somewhat lengthy but well-structured with clear sections (Args, Returns, Examples, Notes). The opening sentence is direct, and each component serves a purpose. Minor redundancy could be trimmed, but overall it's efficient.

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 the presence of an output schema (described in detail), 6 parameters, and zero annotations, the description completely covers usage, behavior, and return values. Examples and notes further enrich completeness, leaving no critical gaps for agent invocation.

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?

All 6 parameters are thoroughly described with valid options, defaults, and behavior (e.g., case-insensitive filters for from_contains). Since schema description coverage is 0%, the description carries the full burden and excels, adding meaning far beyond the bare schema types.

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 tool description explicitly states 'Check inbox via specified email service' and details the retrieval of emails from a service and folder. It distinguishes itself from sibling tools like send_email and email_help by focusing solely on reading emails, with no overlap in functionality.

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 parameter options (services, folders) with defaults and examples. It notes that not all services support inbox checking, offering guidance on when the tool may not be applicable. However, it does not explicitly compare with alternatives like email_status or suggest_email_subject.

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/sandraschi/email-mcp'

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