{"at":"2026-11-23T03:10:33.737Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T03:10:34.143Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T03:10:37.258Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T03:10:37.657Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"apple-mail","version":"0.1.0"}}}}
{"at":"2026-11-23T03:10:37.657Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T03:10:37.657Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T03:10:37.661Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"List all mail accounts and their folders/mailboxes. Returns a tree of account → [mailbox names]. Use this to discover exact mailbox names before calling list_emails or search_emails.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"list_folders"},{"description":"List emails in a specific mailbox with pagination. Returns message summaries including a message_ref that can be passed to get_email, reply_email, move_email, etc. Messages are returned newest-first (index 1 = most recent).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"account":{"description":"Account name, e.g. \"iCloud\" or \"Google\". Use list_folders to see available accounts.","type":"string"},"limit":{"default":20,"description":"Number of messages to return (max 100).","maximum":100,"minimum":1,"type":"integer"},"mailbox":{"description":"Mailbox name, e.g. \"INBOX\", \"Sent Messages\". Must match exactly (case-sensitive).","type":"string"},"offset":{"default":1,"description":"1-based offset for pagination. Start with 1.","maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["account","mailbox"],"type":"object"},"name":"list_emails"},{"description":"Read the full content of a specific email including headers and body. The message_ref comes from list_emails or search_emails results.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"message_ref":{"description":"Composite message reference in format \"account::mailbox::rfc2822-id\". Obtained from list_emails or search_emails results.","type":"string"}},"required":["message_ref"],"type":"object"},"name":"get_email"},{"description":"Search for emails matching criteria across one or all mailboxes. Returns message summaries with message_ref fields for use with other tools. At least one filter (from_filter, subject_filter, after_date, before_date) should be provided.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"account":{"description":"Account to search, e.g. \"iCloud\". Use \"ALL\" to search all accounts. Defaults to \"ALL\".","type":"string"},"after_date":{"description":"Only return messages received after this date. ISO 8601 format: \"YYYY-MM-DD\".","type":"string"},"before_date":{"description":"Only return messages received before this date. ISO 8601 format: \"YYYY-MM-DD\".","type":"string"},"from_filter":{"description":"Substring match on sender name or address.","type":"string"},"limit":{"default":20,"description":"Maximum number of results (max 100).","maximum":100,"minimum":1,"type":"integer"},"mailbox":{"description":"Mailbox to search, e.g. \"INBOX\". Use \"ALL\" to search all mailboxes in the account. Defaults to \"INBOX\".","type":"string"},"subject_filter":{"description":"Substring match on subject line.","type":"string"}},"type":"object"},"name":"search_emails"},{"description":"Compose a new email. If send is false (default), opens the compose window with a draft. If send is true, sends immediately without confirmation.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"body":{"description":"Email body text.","type":"string"},"cc":{"description":"CC recipient email address (optional).","type":"string"},"send":{"default":false,"description":"If true, send immediately. If false (default), open compose window with draft.","type":"boolean"},"subject":{"description":"Email subject line.","type":"string"},"to":{"description":"Recipient email address.","type":"string"}},"required":["to","subject","body"],"type":"object"},"name":"compose_email"},{"description":"Reply to an existing email. If send is false (default), opens the reply in a compose window. If send is true, sends immediately without confirmation.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"body":{"description":"Reply body text.","type":"string"},"message_ref":{"description":"Composite message reference from list_emails or search_emails, e.g. \"iCloud::INBOX::msg-id\".","type":"string"},"send":{"default":false,"description":"If true, send immediately. If false (default), open compose window with reply draft.","type":"boolean"}},"required":["message_ref","body"],"type":"object"},"name":"reply_email"},{"description":"Move an email to a different mailbox. Use list_folders to see available mailbox names.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"dest_account":{"description":"Destination account name, e.g. \"iCloud\".","type":"string"},"dest_mailbox":{"description":"Destination mailbox name, e.g. \"Finance & Accounts\". Must match exactly (case-sensitive).","type":"string"},"message_ref":{"description":"Composite message reference from list_emails or search_emails.","type":"string"}},"required":["message_ref","dest_account","dest_mailbox"],"type":"object"},"name":"move_email"},{"description":"Move an email to the Archive mailbox of its account. Uses 'Archive' for iCloud, 'All Mail' for Gmail.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"message_ref":{"description":"Composite message reference from list_emails or search_emails.","type":"string"}},"required":["message_ref"],"type":"object"},"name":"archive_email"},{"description":"Set or clear the flag on an email.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"flagged":{"description":"True to flag the message, false to unflag it.","type":"boolean"},"message_ref":{"description":"Composite message reference from list_emails or search_emails.","type":"string"}},"required":["message_ref","flagged"],"type":"object"},"name":"flag_email"},{"description":"Mark an email as read or unread.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"message_ref":{"description":"Composite message reference from list_emails or search_emails.","type":"string"},"read":{"description":"True to mark as read, false to mark as unread.","type":"boolean"}},"required":["message_ref","read"],"type":"object"},"name":"mark_read"},{"description":"Move an email to the Junk/Spam mailbox of its account. Uses 'Junk' for iCloud, 'Spam' for Gmail.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"message_ref":{"description":"Composite message reference from list_emails or search_emails.","type":"string"}},"required":["message_ref"],"type":"object"},"name":"move_to_junk"},{"description":"Move an email to the Trash (Deleted Messages for iCloud, Trash for Gmail).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"message_ref":{"description":"Composite message reference from list_emails or search_emails.","type":"string"}},"required":["message_ref"],"type":"object"},"name":"delete_email"},{"description":"Return and clear all real-time incoming mail events pushed by the MailKit extension. Returns an empty array if the extension is not installed or no new mail has arrived since the last call. Each event includes: subject, from, date, messageId, preview, receivedAt.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{},"type":"object"},"name":"get_pending_events"}]}}}
