Knock MCP by usefulapi

v1.1.0
io.usefulapi/knock Checked 1 day ago Published 8 days ago

Read users, messages, delivery logs and workflow runs; trigger or cancel workflows in Knock.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

knock_list_users List users

List users in the current Knock environment, newest first unless ordered otherwise. Use it to find a user id before other calls. Knock API: GET /v1/users.

ParameterTypeDescription
afterstringCursor: next page after this value (use page_info.after from the last response).
beforestringCursor: previous page before this value (use page_info.before).
page_sizeintegerItems per page (Knock default 50).

knock_get_user Get a user

Get one Knock user by id: name, email, phone number, timezone and timestamps. Knock API: GET /v1/users/{user_id}.

ParameterTypeDescription
user_id *stringThe user id.

knock_list_user_messages List a user's messages

List the in-app and channel messages sent to one user, filterable by channel, status, workflow run and insertion time. Knock API: GET /v1/users/{user_id}/messages.

ParameterTypeDescription
user_id *stringThe user id.
afterstringCursor: next page after this value (use page_info.after from the last response).
beforestringCursor: previous page before this value (use page_info.before).
channel_idstringOnly messages from this channel id.
inserted_at.gtestringInserted at or after this ISO 8601 time.
inserted_at.ltestringInserted at or before this ISO 8601 time.
page_sizeintegerItems per page (Knock default 50).
statusstringOnly messages with this status (for example delivered, sent, undelivered).
workflow_run_idstringOnly messages from this workflow run id.

knock_list_messages List messages

List messages across the environment, filterable by channel, status, source, tenant, workflow run and insertion time. Knock API: GET /v1/messages.

ParameterTypeDescription
afterstringCursor: next page after this value (use page_info.after from the last response).
beforestringCursor: previous page before this value (use page_info.before).
channel_idstringOnly messages from this channel id.
inserted_at.gtestringInserted at or after this ISO 8601 time.
inserted_at.ltestringInserted at or before this ISO 8601 time.
page_sizeintegerItems per page (Knock default 50).
sourcestringOnly messages from this source (for example a workflow key).
statusstringOnly messages with this status.
tenantstringOnly messages for this tenant id.
workflow_run_idstringOnly messages from this workflow run id.

knock_get_message Get a message

Get one message by id: channel, status, recipient, workflow, engagement timestamps (seen, read, interacted, archived). Knock API: GET /v1/messages/{message_id}.

ParameterTypeDescription
message_id *stringThe message id.

knock_get_message_content Get message content

Get the rendered content (subject, body, and channel data) of one message. Knock API: GET /v1/messages/{message_id}/content.

ParameterTypeDescription
message_id *stringThe message id.

knock_list_message_delivery_logs List delivery logs

List the delivery attempts and provider responses for one message, to see why a delivery failed. Knock API: GET /v1/messages/{message_id}/delivery_logs.

ParameterTypeDescription
message_id *stringThe message id.
afterstringCursor: next page after this value (use page_info.after from the last response).
beforestringCursor: previous page before this value (use page_info.before).
page_sizeintegerItems per page (Knock default 50).

knock_list_workflow_recipient_runs List workflow recipient runs

List workflow runs per recipient, filterable by workflow key, status, recipient, tenant, errors and time range. Use it to check whether a triggered workflow ran for a user. Knock API: GET /v1/workflow_recipient_runs.

ParameterTypeDescription
afterstringCursor: next page after this value (use page_info.after from the last response).
beforestringCursor: previous page before this value (use page_info.before).
ending_atstringRuns ending at or before this ISO 8601 time.
has_errorsbooleantrue = only runs with errors.
page_sizeintegerItems per page (Knock default 50).
recipientstringOnly runs for this recipient user id.
starting_atstringRuns starting at or after this ISO 8601 time.
statusstringOnly runs with this status.
tenantstringOnly runs for this tenant id.
workflowstringOnly runs of this workflow key.

knock_get_workflow_recipient_run Get a workflow recipient run

Get one workflow recipient run with its events, to see each step a workflow ran for one recipient. Knock API: GET /v1/workflow_recipient_runs/{id}.

ParameterTypeDescription
id *stringThe workflow recipient run id.

knock_list_tenants List tenants

List tenants (groups of users, such as customer accounts) in the current environment. Knock API: GET /v1/tenants.

ParameterTypeDescription
afterstringCursor: next page after this value (use page_info.after from the last response).
beforestringCursor: previous page before this value (use page_info.before).
namestringOnly tenants with this name.
page_sizeintegerItems per page (Knock default 50).
tenant_idstringOnly the tenant with this id.

knock_get_tenant Get a tenant

Get one tenant by id: name and settings. Knock API: GET /v1/tenants/{id}.

ParameterTypeDescription
id *stringThe tenant id.

knock_trigger_workflow Trigger a workflow

Run a Knock workflow for the given recipients. This SENDS real notifications through the channels the workflow defines (email, SMS, push, in-app). Set cancellation_key to cancel the run later. Knock API: POST /v1/workflows/{key}/trigger.

ParameterTypeDescription
key *stringThe workflow key (from the Knock dashboard).
recipients *arrayUp to 1,000 recipients.
actorThe user or object that caused the event.
cancellation_keystringKey to cancel this run later with knock_cancel_workflow.
dataobjectData passed into the workflow run (max 10 MB).
tenantstringTenant id, to use tenant-level overrides.

knock_cancel_workflow Cancel queued workflow runs

Cancel queued runs of a workflow that match a cancellation_key set when the run was triggered. Runs already sent cannot be recalled. Knock API: POST /v1/workflows/{key}/cancel.

ParameterTypeDescription
cancellation_key *stringThe cancellation key used when the run was triggered.
key *stringThe workflow key.
recipientsarrayOnly cancel for these recipients (default: all recipients of the key).