mercury_delete_webhook
Delete a webhook endpoint permanently, stopping all event deliveries to that URL. This action is irreversible and removes past delivery history.
Instructions
Delete a webhook endpoint. DESTRUCTIVE — Mercury stops delivering events to that URL.
USE WHEN: decommissioning a webhook (URL no longer reachable, integration retired, accidental duplicate). ALWAYS confirm with the user — there is no undo, and any downstream system that depended on the events stops being notified.
DO NOT USE: to temporarily silence a webhook (use mercury_update_webhook with status: "paused" instead — reversible).
SIDE EFFECTS: permanent deletion on Mercury's side. Future events that would have fired this webhook are silently dropped — no replay. Past delivery history is also lost from the Mercury dashboard.
RETURNS: confirmation payload ({ deleted: true, ... } or similar).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| webhookId | Yes | The webhook endpoint ID |
Implementation Reference
- src/tools/webhooks.ts:236-239 (handler)The handler function for mercury_delete_webhook. Takes { webhookId }, calls client.delete(`/webhooks/${webhookId}`), and returns the result via textResult.
async ({ webhookId }) => { const data = await client.delete(`/webhooks/${webhookId}`); return textResult(data); }, - src/tools/webhooks.ts:233-235 (schema)Input schema for mercury_delete_webhook: requires a single 'webhookId' field validated as a UUID string.
{ webhookId: z.string().uuid().describe("The webhook endpoint ID"), }, - src/tools/webhooks.ts:219-240 (registration)Registration of the mercury_delete_webhook tool via defineTool(), which wraps the handler with rate-limit and audit-log middleware, then registers it on the MCP server.
defineTool( server, "mercury_delete_webhook", [ "Delete a webhook endpoint. **DESTRUCTIVE — Mercury stops delivering events to that URL.**", "", "USE WHEN: decommissioning a webhook (URL no longer reachable, integration retired, accidental duplicate). ALWAYS confirm with the user — there is no undo, and any downstream system that depended on the events stops being notified.", "", 'DO NOT USE: to temporarily silence a webhook (use `mercury_update_webhook` with `status: "paused"` instead — reversible).', "", "SIDE EFFECTS: **permanent deletion** on Mercury's side. Future events that would have fired this webhook are silently dropped — no replay. Past delivery history is also lost from the Mercury dashboard.", "", "RETURNS: confirmation payload (`{ deleted: true, ... }` or similar).", ].join("\n"), { webhookId: z.string().uuid().describe("The webhook endpoint ID"), }, async ({ webhookId }) => { const data = await client.delete(`/webhooks/${webhookId}`); return textResult(data); }, ); - src/tools/index.ts:37-37 (registration)Calls registerWebhookTools(server, client) which registers all webhook tools including mercury_delete_webhook.
registerWebhookTools(server, client); - src/middleware.ts:60-60 (helper)Maps mercury_delete_webhook to the 'webhooks_delete' rate-limit bucket, shared with other webhook tools.
mercury_delete_webhook: "webhooks_delete",