Write Operations Disabled
Error: invalid input: write tools are disabled
Error: invalid input: write tools are disabled
invalid_inputFull Message:- Add
MAIL_IMAP_WRITE_ENABLED=trueto your environment configuration - Restart the MCP server
- Verify the setting is applied by running
imap_verify_account
Cursor and Pagination Errors
Error: invalid input: cursor is invalid or expired
Error: invalid input: cursor is invalid or expired
invalid_inputFull Message:- Cursor has expired (default TTL: 10 minutes)
- Cursor was evicted from the LRU cache (default max: 512 cursors)
- Server was restarted
Error: invalid input: search matched 25000 messages; narrow filters
Error: invalid input: search matched 25000 messages; narrow filters
invalid_inputFull Message:-
Use date ranges:
-
Filter by sender:
-
Combine multiple filters:
-
Use unread filter:
Error: conflict: mailbox snapshot changed; rerun search
Error: conflict: mailbox snapshot changed; rerun search
conflictFull Message:UIDVALIDITY value changed, indicating:- Mailbox was deleted and recreated
- Server reset the mailbox state
- Mailbox was migrated
Mailbox Errors
Error: not found: cannot examine mailbox 'Folder': ...
Error: not found: cannot examine mailbox 'Folder': ...
not_foundFull Message:- Mailbox does not exist
- Mailbox name is misspelled
- Incorrect delimiter used in hierarchical mailbox names
-
List all mailboxes to verify the exact name:
- Use the exact mailbox name from the list (case-sensitive)
-
Pay attention to the delimiter (
.vs/vs other)
- Gmail:
INBOX,[Gmail]/Sent Mail,[Gmail]/Trash - Office 365:
INBOX,Sent Items,Deleted Items - Generic IMAP:
INBOX,Sent,Trash,Drafts
Error: not found: account 'work' is not configured
Error: not found: account 'work' is not configured
not_foundFull Message:-
List configured accounts:
-
Add the missing account to your environment:
- Restart the MCP server
- Lowercase conversion:
WORK→work,PERSONAL→personal - Special case:
DEFAULT→default - Non-alphanumeric characters become underscores
Message Errors
Error: not found: message uid 12345 not found
Error: not found: message uid 12345 not found
not_foundFull Message:- Message was deleted
- Message was moved to another mailbox
- UID is incorrect
- UIDVALIDITY changed (mailbox was reset)
-
Search for the message again to get current UID:
- Use the message ID from search results (not raw UIDs)
- If the message was moved, search in other mailboxes
Error: invalid input: message_id must start with 'imap'
Error: invalid input: message_id must start with 'imap'
invalid_inputFull Message:imap_search_messages:Correct Format:- Using raw UID instead of full message ID
- Copying partial message ID
- Manually constructing message ID with wrong format
Configuration Errors
Error: No IMAP accounts configured. Set MAIL_IMAP_<ID>_HOST/USER/PASS
Error: No IMAP accounts configured. Set MAIL_IMAP_<ID>_HOST/USER/PASS
invalid_inputFull Message:MAIL_IMAP_<ID>_HOST- IMAP server hostnameMAIL_IMAP_<ID>_USER- Username/emailMAIL_IMAP_<ID>_PASS- Password (use app-specific password)
MAIL_IMAP_<ID>_PORT- Default: 993MAIL_IMAP_<ID>_SECURE- Default: true
Error: invalid input: insecure IMAP is not supported
Error: invalid input: insecure IMAP is not supported
invalid_inputFull Message:MAIL_IMAP_<ACCOUNT>_SECURE=false was set, but the server enforces TLS-only connections.Solution:
Remove the SECURE=false setting or set it to true:Validation Errors
Error: invalid input: invalid date '2024-13-01', expected YYYY-MM-DD
Error: invalid input: invalid date '2024-13-01', expected YYYY-MM-DD
invalid_inputCause:
Date format is incorrect or values are out of range.Solution:
Use ISO 8601 date format (YYYY-MM-DD):Correct Examples:Error: invalid input: body_max_chars must be between 100 and 20000
Error: invalid input: body_max_chars must be between 100 and 20000
invalid_inputCause:
Input parameter is outside the allowed range.Solution:
Use values within the documented bounds:| Parameter | Minimum | Maximum |
|---|---|---|
body_max_chars | 100 | 20,000 |
snippet_max_chars | 50 | 500 |
attachment_text_max_chars | 100 | 50,000 |
max_bytes (raw message) | 1,024 | 1,000,000 |
limit (search) | 1 | 50 |
Related Documentation
- Connection Issues - Timeouts and network errors
- Authentication Problems - Login and credential errors
- Message ID Format - Understanding message identifiers
- Cursor Pagination - Pagination behavior details