SlingHook

v0.5.2
io.github.DylanCourtney584/slinghook Checked 9 hours ago Published 22 days ago

Inspect, debug and replay captured webhooks (Stripe, GitHub, Shopify) from your AI agent.

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

list_endpoints List endpoints

Lists the catch URLs (endpoints) in the current SlingHook workspace, with where each one relays events. Start here to find the endpoint a webhook was sent to.

list_events List events

Lists webhooks captured on an endpoint, newest first, as short summaries (number, time, method, event type, signature status) without bodies. Use get_event for one event in full. Without query or before_id it reads the newest events (up to 50, every plan). query and before_id search the whole retained history, which needs the Pro plan.

ParameterTypeDescription
endpoint *stringEndpoint UUID, catch URL (https://…/c/<id>) or reserved slug, as list_endpoints shows it
before_idintegerPro: page further back; pass next_before_id from the previous result
limitintegerHow many events to return
methodstringOnly this HTTP method, e.g. POST
querystringPro: free text to find in bodies, headers and notes, or a JSON path match such as `type = invoice.paid` or `data.object.id = in_123` (`!=` to exclude)
signaturestringOnly events whose signature check had this result

get_event Get event

Reads one captured webhook in full: method, headers, query string, body and signature status. Long bodies are cut at max_body_chars.

ParameterTypeDescription
event_id *Which event: its number (12 or "#12", from list_events or the dashboard), "latest", "latest <event type>" such as "latest invoice.paid", or the provider's own event id such as evt_1Qx...
max_body_charsintegerLongest body to return

debug_signature Debug signature

Explains why a webhook's signature verified or failed: detected provider scheme (Stripe, GitHub, Shopify, Slack, Standard Webhooks, Twilio), wrong secret, stale timestamp, or a body that was modified (reformatted JSON, re-escaped slashes). Checks against the secret saved on the endpoint, or against `secret` to try a candidate without saving it.

ParameterTypeDescription
event_id *Which event: its number (12 or "#12", from list_events or the dashboard), "latest", "latest <event type>" such as "latest invoice.paid", or the provider's own event id such as evt_1Qx...
secretstringOptional candidate signing secret to test instead of the saved one (not stored)

replay_event Replay event

Re-sends a captured webhook to a URL from this machine (e.g. the local handler at http://localhost:3000/webhooks), with its original method, headers and body, so signature checks run for real. Records the result in the dashboard's replay history and returns the verdict against the previous attempt to the same URL: fixed, regressed, still_failing or still_passing. For an event whose signature is invalid, the handler passes by rejecting it (4xx). It can change state in the receiving app (it is a real webhook delivery).

ParameterTypeDescription
event_id *Which event: its number (12 or "#12", from list_events or the dashboard), "latest", "latest <event type>" such as "latest invoice.paid", or the provider's own event id such as evt_1Qx...
target_url *stringWhere to deliver it, e.g. http://localhost:3000/webhooks

get_replay_result Get replay result

Shows the replay history of one event and the fix verification verdict for the latest replay (or `replay_id`): fixed, regressed, still_failing or still_passing, compared with the attempt before it to the same URL. Includes replays made from the dashboard and by `slinghook listen`. On Pro and above it also returns both response bodies to compare.

ParameterTypeDescription
event_id *Which event: its number (12 or "#12", from list_events or the dashboard), "latest", "latest <event type>" such as "latest invoice.paid", or the provider's own event id such as evt_1Qx...
replay_idintegerA specific replay attempt; default the latest

list_scenarios List scenarios

Lists the saved scenarios on an endpoint: ordered sets of captured events (for example subscription created, payment failed, canceled) that run_scenario replays in sequence. Scenarios are built in the dashboard.

ParameterTypeDescription
endpoint *stringEndpoint UUID, catch URL (https://…/c/<id>) or reserved slug, as list_endpoints shows it

run_scenario Run scenario

Replays every event of a saved scenario, in order, from this machine to a URL (e.g. the local handler), and reports each step: status, pass or fail, and the verdict against that event's previous replay to the same URL. Use it after a fix to prove a whole flow works, not just one event. Steps go back to back unless keep_timing is set (gaps capped at 5 seconds). Each step is a real webhook delivery recorded in replay history, so it can change state in the receiving app.

ParameterTypeDescription
scenario *integerScenario id, from list_scenarios
target_url *stringWhere to deliver each step, e.g. http://localhost:3000/webhooks
keep_timingbooleanWait the recorded gap between steps, up to 5 seconds each
stop_on_failurebooleanStop at the first failing step

generate_handler Generate handler code

Turns a real captured webhook into code to build a handler around: typed models of its payload, a fixture file with the body, and a test that posts it to the handler. Languages: typescript (types + Jest/Vitest test), python (dataclasses + pytest), php (DTO + Laravel test), go (structs; no test). Returns file contents with suggested names; it writes nothing, so save them with your own file tools. Also says which signature scheme the endpoint checks, so the handler can verify it.

ParameterTypeDescription
event_id *Which event: its number (12 or "#12", from list_events or the dashboard), "latest", "latest <event type>" such as "latest invoice.paid", or the provider's own event id such as evt_1Qx...
language *stringLanguage of the handler
partsarrayWhich files to generate. Default: all three
target_urlstringThe handler URL the test posts to. Default: the endpoint's relay URL, or http://localhost:3000/webhooks

compare_events Compare events

Shows what differs between two captured webhooks, field by field (JSON paths such as data.items[0].price), plus header differences. Use it for "this one worked and that one failed, what changed?" or to spot a provider changing its payload. Leave out `b` to compare with the previous event of the same type on the same endpoint. Changes always read from the older event to the newer one. Key order, formatting and per-delivery headers (signatures, request ids, dates) never count.

ParameterTypeDescription
a *First event. Which event: its number (12 or "#12", from list_events or the dashboard), "latest", "latest <event type>" such as "latest invoice.paid", or the provider's own event id such as evt_1Qx...
bSecond event, same forms as `a`. Default: the previous event of the same type on the same endpoint
include_headersbooleanAlso compare headers

create_endpoint Create endpoint

Creates a new catch URL (endpoint) in the current workspace and returns the URL to paste into the provider's webhook settings. If an endpoint with the same name already exists, returns that one instead of making a copy. Plan limits apply (Free has 3 endpoints). It does not take a signing secret: secrets are added in the dashboard so they never pass through the conversation.

ParameterTypeDescription
name *stringWhat it is for, e.g. "Shopify orders (local)"
relay_tostringOptional URL to relay each event to, e.g. http://localhost:3000/webhooks
signature_schemestringProvider signature to check once a secret is added; auto detects it from headers. Standard covers Standard Webhooks / Svix