MCP reference
Email tools
sendmock_email_check
HTML and CSS support across email clients. List-Unsubscribe and one-click unsubscribe checks. Check every link in the message. Score the message with the spam rules.
Toolset email.
| Input | Type | Description |
|---|
| kindrequired | string | Picks what to do. html: HTML and CSS support across email clients. unsubscribe: List-Unsubscribe and one-click unsubscribe checks. links: Check every link in the message. spam: Score the message with the spam rules.One of: html, unsubscribe, links, spamExample: html |
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
Example call
{
"name": "sendmock_email_check",
"arguments": {
"kind": "html",
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
}
}Result: HtmlCheckReport | ListUnsubscribeReport | LinkCheckResult[] | SpamCheckReport
- API
kind: htmlGET/api/v1/emails/{emailId}/html-checkkind: unsubscribeGET/api/v1/emails/{emailId}/list-unsubscribekind: linksPOST/api/v1/emails/{emailId}/link-checkkind: spamPOST/api/v1/emails/{emailId}/spam-check- CLI
sendmock email check <emailId> html, sendmock email check <emailId> unsubscribe, sendmock email check <emailId> links, sendmock email check <emailId> spam- In the app
- Mail > open email > Checks; Mail > open email > Headers
sendmock_email_click
Record a click on one of the email's links and fire email.clicked.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| urlrequired | string | The link that was clicked; one of the email's links (extracted.links).Example: https://app.test/verify?token=abc123 |
| source | string | Who clicked it: ui (a link in the preview), manual (Simulate click) or api (a script). Defaults to api.One of: ui, manual, apiExample: api |
| user_agent | string | The browser or client that clicked, kept in the click history. The UI sends its own.Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) |
| webhook_endpoint_ids | string[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide.Example: ["01JB7T9Q2RENDPOINT00000000"] |
| webhook_requests | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads.Example: [{"endpoint_id":"01JB7T9Q2RENDPOINT00000000","event_type":"email.bounced","body":"{\"type\":\"email.bounced\",\"data\":{\"reason\":\"edited\"}}","headers":{"x-tenant":"acme"}}] |
Example call
{
"name": "sendmock_email_click",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
"url": "https://app.test/verify?token=abc123",
"source": "api",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5)"
}
}Result: nothing
- API
- POST
/api/v1/emails/{emailId}/clicks - CLI
sendmock email click <emailId>- In the app
- Mail > open email > click a link in the preview, or Simulate click
sendmock_email_clicks
Every recorded click on the email's links, newest first.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
Example call
{
"name": "sendmock_email_clicks",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
}
}Result: EmailClickRecord[]
- API
- GET
/api/v1/emails/{emailId}/clicks - CLI
sendmock email clicks <emailId>- In the app
- Mail > open email > Timeline (clicked entries)
sendmock_email_delete
Delete one email.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
Example call
{
"name": "sendmock_email_delete",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
}
}Result: nothing
- API
- DELETE
/api/v1/emails/{emailId} - CLI
sendmock email delete <emailId>- In the app
- Mail > open email > Delete
sendmock_email_delete_all
Delete every email, or only those that match the filters.
Toolset email.
| Input | Type | Description |
|---|
| query | string | Search text; supports from:, to: and tag: prefixes.Example: to:[email protected] reset |
| from | string | |
| to | string | |
| tag | string | Has this tag.Example: signup |
| is_unread | boolean | Only unread.Example: true |
| has_attachment | boolean | Only with attachments.Example: true |
| source | string | How it arrived: smtp, sendmail, native_api, verify, simulated, or an email provider's key, e.g. sendgrid.Example: smtp |
| direction | string | Outbound from your app or inbound to it.One of: outbound, inboundExample: outbound |
| project | string | Only this project's emails (its key); every project's when not set.Example: shop |
Result: nothing
- API
- DELETE
/api/v1/emails - CLI
sendmock email delete-all --yes- In the app
- Mail > Delete all
sendmock_email_forward
Forward as the recipient; the copy arrives as inbound email.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| torequired | string | Where the email is forwarded, e.g. your app's inbound address.Example: [email protected] |
| body | string | A note above the forwarded message.Example: Can you look at this one? |
| from | string | |
| subject | string | Defaults to Fwd: <original subject>.Example: Fwd: Your invoice |
| include_original | boolean | Adds the original below a "Forwarded message" block (default true).Example: true |
| include_attachments | boolean | Forwards the original attachments too (default true).Example: true |
| webhook_endpoint_ids | string[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide.Example: ["01JB7T9Q2RENDPOINT00000000"] |
| webhook_requests | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads.Example: [{"endpoint_id":"01JB7T9Q2RENDPOINT00000000","event_type":"email.bounced","body":"{\"type\":\"email.bounced\",\"data\":{\"reason\":\"edited\"}}","headers":{"x-tenant":"acme"}}] |
Example call
{
"name": "sendmock_email_forward",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
"to": "[email protected]",
"body": "Can you look at this one?",
"from": "[email protected]"
}
}Result: EmailDetail
- API
- POST
/api/v1/emails/{emailId}/forward - CLI
sendmock email forward <emailId>- In the app
- Mail > open email > Forward
sendmock_email_get
One email with bodies, headers, attachments and extracted codes.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
Example call
{
"name": "sendmock_email_get",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
}
}Result: EmailDetail
- API
- GET
/api/v1/emails/{emailId} - CLI
sendmock email show <emailId>- In the app
- Mail > open email
sendmock_email_inbound
Create an incoming email from fields or raw MIME; fires email.inbound.
Toolset email.
| Input | Type | Description |
|---|
| from | string | |
| to | string[] | |
| subject | string | The subject line.Example: Order arrived damaged |
| text | string | The plain-text body.Example: The box was crushed, can I get a replacement? |
| html | string | The HTML body.Example: <p>The box was crushed, can I get a replacement?</p> |
| raw | string | |
| webhook_endpoint_ids | string[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide.Example: ["01JB7T9Q2RENDPOINT00000000"] |
| webhook_requests | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads.Example: [{"endpoint_id":"01JB7T9Q2RENDPOINT00000000","event_type":"email.bounced","body":"{\"type\":\"email.bounced\",\"data\":{\"reason\":\"edited\"}}","headers":{"x-tenant":"acme"}}] |
Result: NativeSendResult
- API
- POST
/api/v1/emails/inbound - CLI
sendmock email inbound- In the app
- Mail > Import .eml > Incoming to your app
sendmock_email_latest
The newest email to a recipient.
Toolset email.
| Input | Type | Description |
|---|
| torequired | string | |
| subject | string | Subject contains.Example: Reset your password |
| project | string | Only this project's emails (its key); every project's when not set.Example: shop |
Example call
{
"name": "sendmock_email_latest",
"arguments": {
"to": "[email protected]",
"subject": "Reset your password",
"project": "shop"
}
}Result: EmailDetail
- API
- GET
/api/v1/emails/latest - CLI
sendmock email latest --to <address>- In the app
- Mail > search to:
sendmock_email_list
Stored emails, newest first, with search and filters.
Toolset email; also answers as sendmock_email_search.
| Input | Type | Description |
|---|
| cursor | string | The next_cursor of the previous page.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| limit | integer | Items per page, 1 to 200 (default 50).Example: 50 |
| query | string | Search text; supports from:, to: and tag: prefixes.Example: to:[email protected] reset |
| from | string | |
| to | string | |
| tag | string | Has this tag.Example: signup |
| is_unread | boolean | Only unread.Example: true |
| has_attachment | boolean | Only with attachments.Example: true |
| source | string | How it arrived: smtp, sendmail, native_api, verify, simulated, or an email provider's key, e.g. sendgrid.Example: smtp |
| direction | string | Outbound from your app or inbound to it.One of: outbound, inboundExample: outbound |
| project | string | Only this project's emails (its key); every project's when not set.Example: shop |
Example call
{
"name": "sendmock_email_list",
"arguments": {
"cursor": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
"limit": 50
}
}Result: PageOf_EmailSummary
- API
- GET
/api/v1/emails - CLI
sendmock email list- In the app
- Mail
sendmock_email_mime
The MIME tree of the message.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
Example call
{
"name": "sendmock_email_mime",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
}
}Result: MimePart
- API
- GET
/api/v1/emails/{emailId}/mime - CLI
sendmock email mime <emailId>- In the app
- Mail > open email > MIME
sendmock_email_open
Record an open and fire email.opened.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| source | string | Who opened it: ui (the SendMock UI), manual (a person marking it) or api (a script). Defaults to api.One of: ui, manual, apiExample: api |
| user_agent | string | The browser or client that opened it, kept in the open history. The UI sends its own.Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5) |
| webhook_endpoint_ids | string[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide.Example: ["01JB7T9Q2RENDPOINT00000000"] |
| webhook_requests | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads.Example: [{"endpoint_id":"01JB7T9Q2RENDPOINT00000000","event_type":"email.bounced","body":"{\"type\":\"email.bounced\",\"data\":{\"reason\":\"edited\"}}","headers":{"x-tenant":"acme"}}] |
Example call
{
"name": "sendmock_email_open",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
"source": "api",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_5)"
}
}Result: nothing
- API
- POST
/api/v1/emails/{emailId}/open - CLI
sendmock email open <emailId>- In the app
- Mail > open email (opening it fires the open)
sendmock_email_opens
Every recorded open of the email, oldest first.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
Example call
{
"name": "sendmock_email_opens",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
}
}Result: OpenRecord[]
- API
- GET
/api/v1/emails/{emailId}/opens - CLI
sendmock email opens <emailId>- In the app
- Mail > open email > Timeline (opened entries)
sendmock_email_release
Send the email on through the allowlisted relay.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| to | string[] | Who receives it on the real SMTP server; empty sends to the original recipients. Every address must match the release allowlist.Example: ["[email protected]"] |
Example call
{
"name": "sendmock_email_release",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
"to": [
"[email protected]"
]
}
}Result: nothing
- API
- POST
/api/v1/emails/{emailId}/release - CLI
sendmock email release <emailId>- In the app
- Mail > open email > Release to real SMTP
sendmock_email_reply
Reply as the recipient; the reply arrives as inbound email.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| body | string | The reply text, above the quoted original; empty or left out sends no text of its own.Example: Thanks, that fixed it! |
| from | string | |
| subject | string | Defaults to Re: <original subject>.Example: Re: Ticket #318 updated |
| reply_all | boolean | Also sends to the other original recipients, in Cc.Example: false |
| include_original | boolean | Quotes the original below an "On ... wrote:" line (default true).Example: true |
| webhook_endpoint_ids | string[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide.Example: ["01JB7T9Q2RENDPOINT00000000"] |
| webhook_requests | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads.Example: [{"endpoint_id":"01JB7T9Q2RENDPOINT00000000","event_type":"email.bounced","body":"{\"type\":\"email.bounced\",\"data\":{\"reason\":\"edited\"}}","headers":{"x-tenant":"acme"}}] |
Example call
{
"name": "sendmock_email_reply",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
"body": "Thanks, that fixed it!",
"from": "[email protected]"
}
}Result: EmailDetail
- API
- POST
/api/v1/emails/{emailId}/reply - CLI
sendmock email reply <emailId>- In the app
- Mail > open email > Reply, Reply all
sendmock_email_send
Native send: JSON with optional base64 attachments.
Toolset email.
| Input | Type | Description |
|---|
| fromrequired | string | |
| torequired | string[] | |
| cc | string[] | |
| bcc | string[] | Hidden copy recipients; stored with the email but not in its headers.Example: ["[email protected]"] |
| subjectrequired | string | The subject line.Example: Your order #1042 has shipped |
| text | string | The plain-text body. Send text, html or both.Example: Hi Sam, your order is on its way. |
| html | string | The HTML body. Send text, html or both.Example: <p>Hi Sam, your order is <b>on its way</b>.</p> |
| headers | object | Extra headers, by name. |
| tags | string[] | Tags to file the email under in Mail.Example: ["orders"] |
| attachments | NativeSendAttachment[] | Files to attach.Example: [{"filename":"invoice-1042.pdf","content":"JVBERi0xLjQKJcfsj6IK","content_type":"application/pdf","content_id":"logo"}] |
Result: NativeSendResult
- API
- POST
/api/v1/send - CLI
sendmock email send- In the app
- Settings > Connection > Send this request
sendmock_email_send_raw
Store a raw message as sent by your app, as the sendmail shim does.
Toolset email.
| Input | Type | Description |
|---|
| contentrequired | string | |
Result: NativeSendResult
- API
- POST
/api/v1/send/raw - CLI
sendmock sendmail- In the app
- Mail > Import .eml > Sent by your app
sendmock_email_simulate
Simulate a delivery outcome such as a bounce or complaint.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| eventrequired | string | The delivery event to simulate; it is added to the timeline and fires its webhook.One of: delivered, deferred, bounced, complained, unsubscribedExample: bounced |
| bounce_type | string | For bounced only: a hard bounce (the address does not exist) or a soft one (try again later).One of: hard, softExample: hard |
| webhook_endpoint_ids | string[] | Send this action's webhooks to exactly these endpoints (IDs from GET /api/v1/webhooks/endpoints) instead of the ones the rules pick; an empty list sends none. Leave it out to let the rules decide.Example: ["01JB7T9Q2RENDPOINT00000000"] |
| webhook_requests | WebhookRequestEdit[] | Payloads edited for this action, by endpoint: each body is sent as written instead of the rendered one and signed over those bytes. Leave it out to send the rendered payloads.Example: [{"endpoint_id":"01JB7T9Q2RENDPOINT00000000","event_type":"email.bounced","body":"{\"type\":\"email.bounced\",\"data\":{\"reason\":\"edited\"}}","headers":{"x-tenant":"acme"}}] |
Example call
{
"name": "sendmock_email_simulate",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
"event": "bounced",
"bounce_type": "hard",
"webhook_endpoint_ids": [
"01JB7T9Q2RENDPOINT00000000"
]
}
}Result: nothing
- API
- POST
/api/v1/emails/{emailId}/simulate - CLI
sendmock email simulate <emailId> <event>- In the app
- Mail > open email > Simulate
sendmock_email_timeline
Delivery events: received, delivered, opened, bounced.
Toolset email.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
Example call
{
"name": "sendmock_email_timeline",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
}
}Result: EmailTimelineEntry[]
- API
- GET
/api/v1/emails/{emailId}/timeline - CLI
sendmock email timeline <emailId>- In the app
- Mail > open email > Timeline
sendmock_email_update
Mark read or unread, or change tags.
Toolset email; also answers as sendmock_email_tag.
| Input | Type | Description |
|---|
| email_idrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| is_read | boolean | Marks the email as read (true) or unread (false).Example: true |
| tags | string[] | Replaces the email's tags; an empty list removes them all.Example: ["signup","qa"] |
Example call
{
"name": "sendmock_email_update",
"arguments": {
"email_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
"is_read": true,
"tags": [
"signup",
"qa"
]
}
}Result: EmailSummary
- API
- PATCH
/api/v1/emails/{emailId} - CLI
sendmock email update <emailId>- In the app
- Mail > open email > Mark as read, tags
sendmock://emails/{emailId}/mime/{partId}
Download one MIME part, decoded, by its position in the MIME tree.
Resource, read as application/octet-stream.
| Parameter | Type | Description |
|---|
| emailIdrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| partIdrequired | string | The part's position in the MIME tree, as GET /emails/{emailId}/mime numbers it, e.g. 1.2.Example: 1.2 |
- API
- GET
/api/v1/emails/{emailId}/mime/{partId} - CLI
sendmock email mime-part <emailId> <partId>- In the app
- Mail > open email > MIME, download a part
sendmock://emails/{emailId}/raw
The raw message source.
Resource, read as message/rfc822.
| Parameter | Type | Description |
|---|
| emailIdrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
- API
- GET
/api/v1/emails/{emailId}/raw - CLI
sendmock email raw <emailId>- In the app
- Mail > open email > Source, download .eml
sendmock://emails/{emailId}/attachments/{attachmentIndex}
Download one attachment.
Resource, read as application/octet-stream.
| Parameter | Type | Description |
|---|
| emailIdrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| attachmentIndexrequired | integer | Position of the file in the email's attachments, starting at 0.Example: 0 |
- API
- GET
/api/v1/emails/{emailId}/attachments/{attachmentIndex} - CLI
sendmock email attachments <emailId> <attachmentIndex>- In the app
- Mail > open email > Attachments
sendmock://emails/{emailId}/parts/{attachmentIndex}/thumbnail
A preview image of an attachment.
Resource, read as image/*.
| Parameter | Type | Description |
|---|
| emailIdrequired | string | The email's ID, from GET /api/v1/emails.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| attachmentIndexrequired | integer | Position of the file in the email's attachments, starting at 0.Example: 0 |
- API
- GET
/api/v1/emails/{emailId}/parts/{attachmentIndex}/thumbnail - CLI
sendmock email thumbnail <emailId> <attachmentIndex>- In the app
- Mail > open email > Attachments (thumbnails)