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

MCP reference

HTTP Catcher tools

sendmock_http_bin_create

Add a bin; 409 when the name is taken.

Toolset http.

    InputTypeDescription
    namerequiredstring
    The bin's name; your app calls /catch/<name>/....Example: slack
    presetstring
    A ready-made bin that answers like the real service (slack, discord, teams, google_chat, telegram, fcm, expo, onesignal, generic); null for a plain bin.One of: slack, discord, teams, google_chat, telegram, fcm, expo, onesignal, genericExample: slack

    Example call

    {
      "name": "sendmock_http_bin_create",
      "arguments": {
        "name": "slack",
        "preset": "slack"
      }
    }

    Result: HttpBin

    API
    POST/api/v1/http/bins
    CLI
    sendmock http bin create
    In the app
    HTTP Catcher > New bin

    sendmock_http_bin_delete

    Delete a bin and its requests.

    Toolset http.

    • Destructive
    • Idempotent
    InputTypeDescription
    bin_idrequiredstring
    The HTTP bin's ID, from GET /api/v1/http/bins.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

    Example call

    {
      "name": "sendmock_http_bin_delete",
      "arguments": {
        "bin_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
      }
    }

    Result: nothing

    API
    DELETE/api/v1/http/bins/{binId}
    CLI
    sendmock http bin delete <binId>
    In the app
    HTTP Catcher > bin > Delete bin

    sendmock_http_bin_list

    Bins, each a capture URL with its own responses.

    Toolset http; also answers as sendmock_http_bins.

    • Read only

    No inputs.

    Example call

    {
      "name": "sendmock_http_bin_list",
      "arguments": {}
    }

    Result: HttpBin[]

    API
    GET/api/v1/http/bins
    CLI
    sendmock http bin list
    In the app
    HTTP Catcher > bins

    sendmock_http_bin_update

    Change a bin's default response.

    Toolset http.

    • Idempotent
    InputTypeDescription
    bin_idrequiredstring
    The HTTP bin's ID, from GET /api/v1/http/bins.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
    default_responserequiredHttpMockResponse
    The reply sent when no rule matches.

    Example call

    {
      "name": "sendmock_http_bin_update",
      "arguments": {
        "bin_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
        "default_response": {
          "status_code": 200,
          "headers": {
            "Content-Type": "application/json"
          },
          "body": "{\"ok\": true}"
        }
      }
    }

    Result: HttpBin

    API
    PATCH/api/v1/http/bins/{binId}
    CLI
    sendmock http bin update <binId>
    In the app
    HTTP Catcher > bin > Responses > Edit default reply

    sendmock_http_clear

    Delete captured requests, all or one bin's.

    Toolset http.

    • Destructive
    • Idempotent
    InputTypeDescription
    bin_idstring
    Only this bin.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

    Example call

    {
      "name": "sendmock_http_clear",
      "arguments": {}
    }

    Result: nothing

    API
    DELETE/api/v1/http/requests
    CLI
    sendmock http clear
    In the app
    HTTP Catcher > bin > Clear requests

    sendmock_http_forward

    Send a captured request on to another URL.

    Toolset http.

      InputTypeDescription
      request_idrequiredstring
      The captured request's ID, from GET /api/v1/http/requests or GET /api/v1/logs/http.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
      urlrequiredstring
      Where the captured request is sent again, e.g. your local handler.Example: http://localhost:3000/webhooks/slack

      Example call

      {
        "name": "sendmock_http_forward",
        "arguments": {
          "request_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
          "url": "http://localhost:3000/webhooks/slack"
        }
      }

      Result: HttpForwardResult

      API
      POST/api/v1/http/requests/{requestId}/forward
      CLI
      sendmock http forward <requestId>
      In the app
      HTTP Catcher > request > Forward to URL

      sendmock_http_get

      One captured request and what SendMock answered.

      Toolset http.

      • Read only
      InputTypeDescription
      request_idrequiredstring
      The captured request's ID, from GET /api/v1/http/requests or GET /api/v1/logs/http.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

      Example call

      {
        "name": "sendmock_http_get",
        "arguments": {
          "request_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
        }
      }

      Result: CapturedHttpRequest

      API
      GET/api/v1/http/requests/{requestId}
      CLI
      sendmock http show <requestId>
      In the app
      HTTP Catcher > open a request

      sendmock_http_list

      Captured requests, newest first.

      Toolset http.

      • Read only
      InputTypeDescription
      cursorstring
      The next_cursor of the previous page.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
      limitinteger
      Items per page, 1 to 200 (default 50).Example: 50
      bin_idstring
      Only this bin.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

      Example call

      {
        "name": "sendmock_http_list",
        "arguments": {
          "cursor": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
          "limit": 50
        }
      }

      Result: PageOf_CapturedHttpRequest

      API
      GET/api/v1/http/requests
      CLI
      sendmock http list
      In the app
      HTTP Catcher > Requests

      sendmock_http_response_list

      A bin's response rules, checked from top to bottom.

      Toolset http.

      • Read only
      InputTypeDescription
      bin_idrequiredstring
      The HTTP bin's ID, from GET /api/v1/http/bins.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

      Example call

      {
        "name": "sendmock_http_response_list",
        "arguments": {
          "bin_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
        }
      }

      Result: HttpResponseRule[]

      API
      GET/api/v1/http/bins/{binId}/responses
      CLI
      sendmock http response list <binId>
      In the app
      HTTP Catcher > bin > Responses

      sendmock_http_response_preview

      Which rule a captured request would match, and its answer.

      Toolset http.

      • Read only
      InputTypeDescription
      bin_idrequiredstring
      The HTTP bin's ID, from GET /api/v1/http/bins.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
      rulerequiredHttpResponseRule
      The rule to try, saved or not.
      request_idrequiredstring
      The captured request to try it on.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

      Example call

      {
        "name": "sendmock_http_response_preview",
        "arguments": {
          "bin_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
          "rule": {
            "id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
            "name": "Rate limit the push API",
            "is_enabled": true,
            "method": "POST",
            "path_glob": "/v1/*",
            "filter": {
              "all": [
                null
              ]
            },
            "response": {
              "status_code": 200,
              "headers": {
                "Content-Type": "application/json"
              },
              "body": "{\"ok\": true}"
            },
            "delay_min_ms": 0,
            "delay_max_ms": 500,
            "failure_rate_percent": 10,
            "failure_status_code": 503
          },
          "request_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
        }
      }

      Result: HttpRulePreviewResult

      API
      POST/api/v1/http/bins/{binId}/responses/preview
      CLI
      sendmock http response preview <binId>
      In the app
      HTTP Catcher > bin > Responses > rule sheet > Preview

      sendmock_http_response_set

      Replace a bin's response rules.

      Toolset http.

      • Idempotent
      InputTypeDescription
      bin_idrequiredstring
      The HTTP bin's ID, from GET /api/v1/http/bins.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

      Example call

      {
        "name": "sendmock_http_response_set",
        "arguments": {
          "bin_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
        }
      }

      Result: HttpResponseRule[]

      API
      PUT/api/v1/http/bins/{binId}/responses
      CLI
      sendmock http response set <binId>
      In the app
      HTTP Catcher > bin > Responses > Add rule, edit, move, enabled switch

      sendmock_http_send

      Capture a request in a bin and answer with its matching response rule or default response.

      Toolset http.

        InputTypeDescription
        methodrequiredstring
        Picks what to do. GET: Capture a request in a bin and answer with its matching response rule or default response. POST: Capture a request in a bin and answer with its matching response rule or default response. PUT: Capture a request in a bin and answer with its matching response rule or default response. PATCH: Capture a request in a bin and answer with its matching response rule or default response. DELETE: Capture a request in a bin and answer with its matching response rule or default response.One of: GET, POST, PUT, PATCH, DELETEExample: GET
        bin_pathrequiredstring
        The bin's name, then any path your app adds, e.g. slack/services/T000/B000.Example: slack
        contentstring
        The raw request body (*/*). Text as is; base64 for binary content.Example: {"text": "hello"}

        Example call

        {
          "name": "sendmock_http_send",
          "arguments": {
            "method": "GET",
            "bin_path": "slack"
          }
        }

        Result: file (*/*)

        API
        method: GETGET/catch/{binPath}method: POSTPOST/catch/{binPath}method: PUTPUT/catch/{binPath}method: PATCHPATCH/catch/{binPath}method: DELETEDELETE/catch/{binPath}
        CLI
        sendmock http send <bin>
        In the app
        HTTP Catcher > Send a sample request

        sendmock://http/requests/{requestId}/files/{fileIndex}

        Download a file uploaded in a captured request.

        Resource, read as application/octet-stream.

        ParameterTypeDescription
        requestIdrequiredstring
        The captured request's ID, from GET /api/v1/http/requests or GET /api/v1/logs/http.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
        fileIndexrequiredinteger
        Position of the uploaded file in the request's files, starting at 0.Example: 0
        API
        GET/api/v1/http/requests/{requestId}/files/{fileIndex}
        CLI
        sendmock http file <requestId> <fileIndex>
        In the app
        HTTP Catcher > request > Body > files