wait_for_callback
Block execution until a webhook callback arrives at the endpoint, returning the verified payload. Use for async workflows to avoid polling.
Instructions
Block until the next webhook (callback) arrives at an endpoint, then return it — instead of polling. Use this for async/long-running work: kick off the job with the endpoint URL as its callback, then call wait_for_callback to receive the result the moment it lands (signature-verified, decrypted). Returns { status: 'received', request } on delivery, or { status: 'pending' } if timeoutMs elapses first (just call again to keep waiting). Pass after (the receivedAt of the last callback you saw) so a callback that arrived between calls is returned immediately rather than missed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Endpoint slug to wait on (from create_callback_endpoint) | |
| timeoutMs | No | How long to block before returning 'pending' (1000–60000, default 30000). | |
| after | No | Optional ISO timestamp cursor. Any callback received after this is returned immediately without blocking — pass the previous callback's receivedAt to avoid missing one between calls. |