madeonsol_delete_webhook
Permanently delete a webhook and its delivery history by providing the webhook ID.
Instructions
Delete a webhook by ID. Permanently removes the webhook and its delivery history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Webhook ID to delete |
Implementation Reference
- src/index.ts:500-509 (handler)The handler for the madeonsol_delete_webhook tool. It accepts an 'id' parameter (number), makes a DELETE request to /api/v1/webhooks/{id} via the restQuery helper, and returns the response text.
server.tool( "madeonsol_delete_webhook", "Delete a webhook by ID. Permanently removes the webhook and its delivery history.", { id: z.number().describe("Webhook ID to delete"), }, { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true }, async ({ id }) => ({ content: [{ type: "text" as const, text: await restQuery("DELETE", `/webhooks/${id}`) }], }) - src/index.ts:503-505 (schema)Input schema for madeonsol_delete_webhook: requires a single numeric 'id' parameter representing the webhook ID to delete.
{ id: z.number().describe("Webhook ID to delete"), }, - src/index.ts:500-510 (registration)Registration of the madeonsol_delete_webhook tool on the McpServer instance via server.tool(). Conditionally registered only when authMode is 'madeonsol' (i.e., MADEONSOL_API_KEY is set).
server.tool( "madeonsol_delete_webhook", "Delete a webhook by ID. Permanently removes the webhook and its delivery history.", { id: z.number().describe("Webhook ID to delete"), }, { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true }, async ({ id }) => ({ content: [{ type: "text" as const, text: await restQuery("DELETE", `/webhooks/${id}`) }], }) ); - src/index.ts:451-466 (helper)Helper function restQuery used by the delete webhook handler. It makes an authenticated fetch to the MadeOnSol API v1 endpoint with the given HTTP method, path, and optional body. The handler calls restQuery('DELETE', '/webhooks/${id}').
async function restQuery(method: string, path: string, body?: unknown): Promise<string> { const headers: Record<string, string> = { "Content-Type": "application/json", ...apiKeyHeaders(), }; const res = await fetch(`${BASE_URL}/api/v1${path}`, { method, headers, ...(body ? { body: JSON.stringify(body) } : {}), }); if (!res.ok) { const text = await res.text().catch(() => ""); return `Error ${res.status}: ${text}`; } return JSON.stringify(await res.json(), null, 2); }