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

MCP reference

Webhook variables tools

sendmock_webhook_variable_list

Global and endpoint variables; secret values are masked.

Toolset variables.

  • Read only
InputTypeDescription
endpoint_idstring
Only this endpoint's variables.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Example call

{
  "name": "sendmock_webhook_variable_list",
  "arguments": {}
}

Result: WebhookVariable[]

API
GET/api/v1/webhooks/variables
CLI
sendmock webhook var list
In the app
Webhooks > Variables

sendmock_webhook_variable_preview

What a variable definition resolves to against the sample.

Toolset variables.

  • Read only
InputTypeDescription
kindrequiredstring
The variable kind, as in a variable.One of: text, number, boolean, json, secret, dynamic, random, computed, promptExample: random
valuerequiredstring
The value, expression or generator to try.Example: random_string(16)

Example call

{
  "name": "sendmock_webhook_variable_preview",
  "arguments": {
    "kind": "random",
    "value": "random_string(16)"
  }
}

Result: VariablePreviewResult

API
POST/api/v1/webhooks/variables/preview
CLI
sendmock webhook var preview
In the app
Webhooks > Variables > variable sheet > Resolves to

sendmock_webhook_variable_regenerate

Make a new fixed value for a generated-once random variable.

Toolset variables.

    InputTypeDescription
    variable_idrequiredstring
    The webhook variable's ID, from GET /api/v1/webhooks/variables.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

    Example call

    {
      "name": "sendmock_webhook_variable_regenerate",
      "arguments": {
        "variable_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
      }
    }

    Result: WebhookVariable

    API
    POST/api/v1/webhooks/variables/{variableId}/regenerate
    CLI
    sendmock webhook var regenerate <variableId>
    In the app
    Webhooks > Variables > Regenerate

    sendmock_webhook_variable_set

    Add a variable.

    Toolset variables.

      InputTypeDescription
      namerequiredstring
      The name templates read it by, as {{ vars.<name> }}.Example: tenant_id
      kindrequiredstring
      text, number, boolean, json and secret are fixed values; dynamic is read from the event, random is generated, computed combines other variables and prompt is asked for on manual sends.One of: text, number, boolean, json, secret, dynamic, random, computed, promptExample: text
      scoperequiredstring
      global for every endpoint, or endpoint for one; endpoint values win.One of: global, endpointExample: global
      endpoint_idstring
      The endpoint of an endpoint variable; null for global ones.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
      valuerequiredstring
      Static value, expression, generator or default; secrets are masked.Example: acme
      random_modestring
      For random: per_send generates a new value each time, fixed keeps one value until Regenerate; null for other kinds.One of: per_send, fixedExample: per_send
      descriptionrequiredstring
      What the variable is for.Example: Tenant every webhook is sent for

      Example call

      {
        "name": "sendmock_webhook_variable_set",
        "arguments": {
          "name": "tenant_id",
          "kind": "text",
          "scope": "global",
          "value": "acme",
          "description": "Tenant every webhook is sent for",
          "random_mode": "per_send"
        }
      }

      Result: WebhookVariable

      API
      POST/api/v1/webhooks/variables
      CLI
      sendmock webhook var set <name> <value>
      In the app
      Webhooks > Variables > Add variable

      sendmock_webhook_variable_unset

      Delete a variable.

      Toolset variables.

      • Destructive
      • Idempotent
      InputTypeDescription
      variable_idrequiredstring
      The webhook variable's ID, from GET /api/v1/webhooks/variables.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

      Example call

      {
        "name": "sendmock_webhook_variable_unset",
        "arguments": {
          "variable_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D"
        }
      }

      Result: nothing

      API
      DELETE/api/v1/webhooks/variables/{variableId}
      CLI
      sendmock webhook var unset <variableId>
      In the app
      Webhooks > Variables > Delete

      sendmock_webhook_variable_update

      Change a variable.

      Toolset variables.

      • Idempotent
      InputTypeDescription
      variable_idrequiredstring
      The webhook variable's ID, from GET /api/v1/webhooks/variables.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
      namerequiredstring
      The name templates read it by, as {{ vars.<name> }}.Example: tenant_id
      kindrequiredstring
      text, number, boolean, json and secret are fixed values; dynamic is read from the event, random is generated, computed combines other variables and prompt is asked for on manual sends.One of: text, number, boolean, json, secret, dynamic, random, computed, promptExample: text
      scoperequiredstring
      global for every endpoint, or endpoint for one; endpoint values win.One of: global, endpointExample: global
      endpoint_idstring
      The endpoint of an endpoint variable; null for global ones.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
      valuerequiredstring
      Static value, expression, generator or default; secrets are masked.Example: acme
      random_modestring
      For random: per_send generates a new value each time, fixed keeps one value until Regenerate; null for other kinds.One of: per_send, fixedExample: per_send
      descriptionrequiredstring
      What the variable is for.Example: Tenant every webhook is sent for

      Example call

      {
        "name": "sendmock_webhook_variable_update",
        "arguments": {
          "variable_id": "01JB7T9Q2R5W8X3Y6Z1A4B7C9D",
          "name": "tenant_id",
          "kind": "text",
          "scope": "global",
          "value": "acme",
          "description": "Tenant every webhook is sent for",
          "random_mode": "per_send"
        }
      }

      Result: WebhookVariable

      API
      PATCH/api/v1/webhooks/variables/{variableId}
      CLI
      sendmock webhook var update <variableId>
      In the app
      Webhooks > Variables > Edit