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
| Name | Required | Description | Default |
|---|---|---|---|
| service | No | default | |
| folder | No | INBOX | |
| limit | No | ||
| unread_only | No | ||
| from_contains | No | ||
| subject_contains | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||