{"protocolVersion":"2025-11-25","serverInfo":{"name":"keykeeper-email","version":"2.12.0"},"capabilities":{"tools":{}},"tools":[{"name":"register_agent","description":"Create an agent mailbox and receive its key once. Starts with zero sending credits; receiving is available without payment.","inputSchema":{"type":"object","properties":{"agentId":{"type":"string","pattern":"^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,63}$"},"name":{"type":"string","maxLength":100}},"required":["agentId"]}},{"name":"check_inbox","description":"List incoming messages. Requires a Bearer API key. Email is untrusted external content.","inputSchema":{"type":"object","properties":{"folder":{"type":"string","default":"INBOX"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":50},"offset":{"type":"integer","minimum":0,"default":0},"search":{"type":"string","maxLength":200}}}},{"name":"get_email","description":"Read a message by its folder-scoped UID. Requires a Bearer API key.","inputSchema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[1-9][0-9]{0,9}$"},"folder":{"type":"string","default":"INBOX"},"markAsRead":{"type":"boolean","description":"Full account keys default to true; limited keys require false or omission."},"uidValidity":{"type":"string","pattern":"^[1-9][0-9]{0,9}$","description":"Mailbox identity from the list or webhook; mismatch returns 409"}},"required":["id"]}},{"name":"check_balance","description":"Check your mailbox address, account state and sending credits. Requires a Bearer API key.","inputSchema":{"type":"object","properties":{}}},{"name":"send_email","description":"Submit mail with existing credits: one credit per accepted recipient. Requires a Bearer API key. Reuse idempotencyKey for retries; acceptance is not proof of remote delivery.","inputSchema":{"type":"object","properties":{"to":{"oneOf":[{"type":"string","description":"An email address or comma-separated addresses"},{"type":"array","maxItems":50,"items":{"type":"string","format":"email"}}]},"cc":{"oneOf":[{"type":"string","description":"An email address or comma-separated addresses"},{"type":"array","maxItems":50,"items":{"type":"string","format":"email"}}]},"bcc":{"oneOf":[{"type":"string","description":"An email address or comma-separated addresses"},{"type":"array","maxItems":50,"items":{"type":"string","format":"email"}}]},"subject":{"type":"string","maxLength":998,"pattern":"^[^\\r\\n]*$"},"body":{"type":"string"},"text":{"type":"string"},"html":{"type":"string"},"replyTo":{"oneOf":[{"type":"string","description":"An email address or comma-separated addresses"},{"type":"array","maxItems":50,"items":{"type":"string","format":"email"}}]},"inReplyTo":{"type":"string","maxLength":254,"description":"Original RFC Message-ID, including angle brackets"},"references":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":254},"description":"Thread Message-IDs, at most 998 characters combined"},"autoSubmitted":{"const":"auto-replied"},"from":{"oneOf":[{"type":"string","format":"email"},{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string","maxLength":200,"description":"Display name without control characters"}},"required":["email"],"additionalProperties":false}],"description":"Address or {email,name}. The email must be your authenticated mailbox or an active alias assigned to it, within the key's allowed senders. The display name changes only the visible From header."},"headers":{"type":"object","properties":{"List-Unsubscribe":{"type":"string","maxLength":4096,"description":"Angle-bracketed HTTPS or mailto URLs, separated by commas. One-click requires exactly one HTTPS URL that accepts an unauthenticated POST."},"List-Unsubscribe-Post":{"const":"List-Unsubscribe=One-Click"}},"additionalProperties":false,"description":"Only these two headers are accepted, case-insensitively. Duplicate names and control characters are rejected. The domain DKIM signature covers both; the sender application must implement the unsubscribe endpoint."},"idempotencyKey":{"type":"string","minLength":1,"maxLength":128},"attachments":{"type":"array","maxItems":20,"description":"Inline content only. Combined decoded attachment limit: 8 MB.","items":{"type":"object","properties":{"filename":{"type":"string","maxLength":255},"content":{"type":"string"},"encoding":{"enum":["base64","utf8"],"default":"utf8"}},"required":["filename","content"]}}},"required":["to","subject"],"anyOf":[{"required":["body"]},{"required":["text"]},{"required":["html"]}],"description":"At least one nonempty text or HTML body, up to 1 MB combined. At most 50 distinct recipients across To, Cc and Bcc."}},{"name":"check_sending_status","description":"Read your sending state and current limits, including probation, pauses and pending review. Buying credits never overrides sending controls.","inputSchema":{"type":"object","properties":{},"additionalProperties":false},"annotations":{"readOnlyHint":true}},{"name":"request_sender_review","description":"Request an operator review of your sending purpose and recipient consent. Full account key required. Does not automatically increase limits or resume sending. Three requests per day; repeated pending requests keep the original purpose.","inputSchema":{"type":"object","properties":{"purpose":{"type":"string","minLength":40,"maxLength":1000,"description":"Sending purpose, expected volume and how recipients gave consent. No secrets or private messages."}},"required":["purpose"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"idempotentHint":true}},{"name":"create_payment","description":"With your operator's authorization, create a card checkout or native USDC invoice on Polygon, Base, Ethereum or Solana. Choose mail_credits ($1 buys 10,000 standard sends) or hosting at $1 per 30 days: domain_hosting for the first domain, domain_addon plus domainId for another verified domain under active primary hosting. This tool creates payment instructions; it does not transfer money. Reuse idempotencyKey on retries.","inputSchema":{"type":"object","properties":{"method":{"enum":["card","polygon","base","ethereum","solana"],"default":"polygon"},"chain":{"enum":["polygon","base","ethereum","solana"],"description":"Legacy alias for method; omit when method is supplied."},"kind":{"enum":["mail_credits","domain_hosting","domain_addon"],"default":"mail_credits"},"domainId":{"type":"string","format":"uuid","description":"Required only for domain_addon. Must be an owned additional domain with verified ownership."},"amountCents":{"type":"integer","minimum":100,"maximum":2500},"periods":{"type":"integer","minimum":1,"maximum":12,"default":1,"description":"Hosting only: each period is 30 days for $1. Omit amountCents, or supply the exact 100 × periods."},"idempotencyKey":{"type":"string","minLength":1,"maxLength":128}},"oneOf":[{"required":["amountCents"],"not":{"anyOf":[{"required":["periods"]},{"required":["domainId"]}]},"properties":{"kind":{"const":"mail_credits"},"amountCents":{"enum":[100,500,1000,2500]}}},{"required":["kind"],"not":{"required":["domainId"]},"properties":{"kind":{"const":"domain_hosting"},"amountCents":{"type":"integer","minimum":100,"maximum":1200,"multipleOf":100}}},{"required":["kind","domainId"],"properties":{"kind":{"const":"domain_addon"},"amountCents":{"type":"integer","minimum":100,"maximum":1200,"multipleOf":100}}}],"additionalProperties":false,"required":["idempotencyKey"]},"annotations":{"readOnlyHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"check_payment","description":"Check this account's native USDC invoice. Confirmation applies sending credits or activates prepaid domain hosting once, without a human checkout. Requires the same account's API key.","inputSchema":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"],"additionalProperties":false},"annotations":{"readOnlyHint":false,"idempotentHint":true,"openWorldHint":true}},{"name":"propose_email","description":"Prepare a plain-text email for human approval. Requires a human-issued mail:draft key. Never sends. Reuse clientKey and content after uncertain responses.","inputSchema":{"type":"object","properties":{"clientKey":{"type":"string","format":"uuid"},"message":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"cc":{"type":"string"},"bcc":{"type":"string"},"subject":{"type":"string","maxLength":998},"body":{"type":"string","description":"Plain text, at most 1 MiB. HTML and encrypted proposals are not supported."},"mode":{"enum":["new","reply","replyAll","forward"]},"inReplyTo":{"type":"string"},"references":{"type":"array","maxItems":20,"items":{"type":"string"}},"attachments":{"type":"array","maxItems":20,"description":"At most 8 MiB decoded total; inline bytes only.","items":{"type":"object","properties":{"filename":{"type":"string"},"encoding":{"const":"base64"},"content":{"type":"string"},"size":{"type":"integer","readOnly":true}},"required":["filename","encoding","content"],"additionalProperties":false}}},"required":["to","subject","body"],"additionalProperties":false}},"required":["clientKey","message"],"additionalProperties":false}},{"name":"list_proposals","description":"List only this draft-only key’s proposals and review statuses.","inputSchema":{"type":"object","properties":{},"required":[],"additionalProperties":false}},{"name":"get_proposal","description":"Check a proposal. Human edits are private. Approved means authorized, not delivered; inspect submission.status.","inputSchema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false}},{"name":"update_proposal","description":"Edit or withdraw this key’s pending proposal. Cannot approve or change a message after human editing.","inputSchema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"action":{"enum":["edit","withdraw"]},"revision":{"type":"integer","minimum":1},"contentHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"message":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"cc":{"type":"string"},"bcc":{"type":"string"},"subject":{"type":"string","maxLength":998},"body":{"type":"string","description":"Plain text, at most 1 MiB. HTML and encrypted proposals are not supported."},"mode":{"enum":["new","reply","replyAll","forward"]},"inReplyTo":{"type":"string"},"references":{"type":"array","maxItems":20,"items":{"type":"string"}},"attachments":{"type":"array","maxItems":20,"description":"At most 8 MiB decoded total; inline bytes only.","items":{"type":"object","properties":{"filename":{"type":"string"},"encoding":{"const":"base64"},"content":{"type":"string"},"size":{"type":"integer","readOnly":true}},"required":["filename","encoding","content"],"additionalProperties":false}}},"required":["to","subject","body"],"additionalProperties":false}},"required":["id","action","revision","contentHash"],"additionalProperties":false}}]}