madeonsol_list_webhooks
View all registered webhooks including their delivery status and failure counts to monitor webhook health.
Instructions
List all your registered webhooks with delivery status and failure counts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:490-498 (registration)Tool registration via server.tool() call — registers 'madeonsol_list_webhooks' with the MCP server. No input schema required (empty object {}). Uses readOnly annotations. Delegates to the restQuery helper.
server.tool( "madeonsol_list_webhooks", "List all your registered webhooks with delivery status and failure counts.", {}, { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }, async () => ({ content: [{ type: "text" as const, text: await restQuery("GET", "/webhooks") }], }) ); - src/index.ts:495-498 (handler)Handler function for madeonsol_list_webhooks — an async arrow function that calls restQuery('GET', '/webhooks') to list all registered webhooks from the MadeOnSol API.
async () => ({ content: [{ type: "text" as const, text: await restQuery("GET", "/webhooks") }], }) ); - src/index.ts:492-493 (schema)Schema definition — empty input schema (no parameters needed) for listing webhooks.
"List all your registered webhooks with delivery status and failure counts.", {}, - src/index.ts:451-466 (helper)restQuery helper function — generic HTTP request helper used by the webhook tools. Takes method, path, and optional body, sends a fetch to BASE_URL/api/v1{path} with JSON headers and API key auth, returns the JSON response as a string.
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); } - src/index.ts:447-449 (helper)Guard condition: tool is only registered when hasRestAuth (authMode === 'madeonsol') is true, meaning it requires a MadeOnSol API key (Pro/Ultra tier).
// ── Webhook & Streaming tools (require MadeOnSol API key — Pro/Ultra tier) ── const hasRestAuth = authMode === "madeonsol";