Preview: SendMock has no stable release yet. These docs follow develop.

MCP reference

Inbound routes tools

sendmock_inbound_route_create

Add a route.

Toolset rules.

    InputTypeDescription
    priorityrequirednumber
    Lower runs first.Example: 10
    descriptionrequiredstring
    A name for the route, shown in the list.Example: Ticket replies to the helpdesk
    filterrequiredInboundRouteFilter
    Which incoming emails the route takes.
    actionsrequiredInboundRouteAction[]
    What the route does with a matching email, in order.Example: [{"kind":"forward_url","url":"http://localhost:8000/webhooks/mail"}]

    Example call

    {
      "name": "sendmock_inbound_route_create",
      "arguments": {
        "priority": 10,
        "description": "Ticket replies to the helpdesk",
        "filter": {
          "kind": "match_recipient",
          "pattern": "reply\\+(?P<token>.+)@reply.app.test"
        },
        "actions": [
          {
            "kind": "forward_url",
            "url": "http://localhost:8000/webhooks/mail"
          }
        ]
      }
    }

    Result: InboundRoute

    API
    POST/api/v1/inbound-routes
    CLI
    sendmock route create
    In the app
    Webhooks > Inbound routes > Add route

    sendmock_inbound_route_delete

    Delete a route.

    Toolset rules.

    • Destructive
    • Idempotent
    InputTypeDescription
    route_idrequiredstring
    The inbound route's ID, from GET /api/v1/inbound-routes.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

    Example call

    {
      "name": "sendmock_inbound_route_delete",
      "arguments": {
        "route_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
      }
    }

    Result: nothing

    API
    DELETE/api/v1/inbound-routes/{routeId}
    CLI
    sendmock route delete <routeId>
    In the app
    Webhooks > Inbound routes > Delete

    sendmock_inbound_route_list

    Routes for incoming email, in priority order.

    Toolset rules.

    • Read only

    No inputs.

    Example call

    {
      "name": "sendmock_inbound_route_list",
      "arguments": {}
    }

    Result: InboundRoute[]

    API
    GET/api/v1/inbound-routes
    CLI
    sendmock route list
    In the app
    Webhooks > Inbound routes

    sendmock_inbound_route_match

    Where an incoming email would go: the routes and webhook rules it would run.

    Toolset rules.

    • Read only
    InputTypeDescription
    torequiredstring[]
    The recipients the incoming email would have.Example: ["[email protected]"]
    ccstring[]
    Copied recipients; routes read them like to.Example: ["[email protected]"]
    headersobject
    Headers by name.

    Example call

    {
      "name": "sendmock_inbound_route_match",
      "arguments": {
        "to": [
          "[email protected]"
        ],
        "cc": [
          "[email protected]"
        ]
      }
    }

    Result: InboundRouteMatchResult

    API
    POST/api/v1/inbound-routes/match
    CLI
    sendmock route match
    In the app
    Mail > Reply, Reply all, Forward > Delivers to

    sendmock_inbound_route_test

    Which routes a recipient or header would match, and what runs.

    Toolset rules.

    • Read only
    InputTypeDescription
    filterrequiredInboundRouteFilter
    The filter to try on the 50 most recent incoming emails.

    Example call

    {
      "name": "sendmock_inbound_route_test",
      "arguments": {
        "filter": {
          "kind": "match_recipient",
          "pattern": "reply\\+(?P<token>.+)@reply.app.test"
        }
      }
    }

    Result: InboundRouteTestResult

    API
    POST/api/v1/inbound-routes/test
    CLI
    sendmock route test
    In the app
    Webhooks > Inbound routes > route sheet > Preview

    sendmock_inbound_route_update

    Change a route.

    Toolset rules.

    • Idempotent
    InputTypeDescription
    route_idrequiredstring
    The inbound route's ID, from GET /api/v1/inbound-routes.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
    priorityrequirednumber
    Lower runs first.Example: 10
    descriptionrequiredstring
    A name for the route, shown in the list.Example: Ticket replies to the helpdesk
    filterrequiredInboundRouteFilter
    Which incoming emails the route takes.
    actionsrequiredInboundRouteAction[]
    What the route does with a matching email, in order.Example: [{"kind":"forward_url","url":"http://localhost:8000/webhooks/mail"}]

    Example call

    {
      "name": "sendmock_inbound_route_update",
      "arguments": {
        "route_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
        "priority": 10,
        "description": "Ticket replies to the helpdesk",
        "filter": {
          "kind": "match_recipient",
          "pattern": "reply\\+(?P<token>.+)@reply.app.test"
        },
        "actions": [
          {
            "kind": "forward_url",
            "url": "http://localhost:8000/webhooks/mail"
          }
        ]
      }
    }

    Result: InboundRoute

    API
    PATCH/api/v1/inbound-routes/{routeId}
    CLI
    sendmock route update <routeId>
    In the app
    Webhooks > Inbound routes > Edit, move