mercury_list_webhooks
List all registered webhook endpoints in your Mercury workspace to audit configurations, find webhook IDs before updates or deletions, or verify that delivery targets are active.
Instructions
List all webhook endpoints configured for your Mercury workspace.
USE WHEN: enumerating registered webhook endpoints — for audit, finding a webhook ID before update/delete, or to confirm a delivery target is registered.
DO NOT USE: to inspect webhook delivery history (Mercury exposes that only via the dashboard, not the API).
RETURNS: { webhooks: [{ id, url, status, events, ... }] }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/webhooks.ts:138-142 (handler)The handler function for mercury_list_webhooks: calls client.get('/webhooks') and returns the result via textResult.
async () => { const data = await client.get("/webhooks"); return textResult(data); }, ); - src/tools/webhooks.ts:137-137 (schema)Empty input schema ({}) for mercury_list_webhooks — no parameters required.
{}, - src/tools/webhooks.ts:124-142 (registration)Registration via defineTool() inside registerWebhookTools(), called from src/tools/index.ts (line 37).
export function registerWebhookTools(server: McpServer, client: MercuryClient): void { defineTool( server, "mercury_list_webhooks", [ "List all webhook endpoints configured for your Mercury workspace.", "", "USE WHEN: enumerating registered webhook endpoints — for audit, finding a webhook ID before update/delete, or to confirm a delivery target is registered.", "", "DO NOT USE: to inspect webhook delivery history (Mercury exposes that only via the dashboard, not the API).", "", "RETURNS: `{ webhooks: [{ id, url, status, events, ... }] }`.", ].join("\n"), {}, async () => { const data = await client.get("/webhooks"); return textResult(data); }, ); - src/tools/_shared.ts:29-39 (helper)defineTool helper function that wraps the handler and registers the tool on the MCP server.
export function defineTool<S extends ZodRawShape>( server: McpServer, name: string, description: string, inputSchema: S, handler: (args: z.infer<z.ZodObject<S>>) => Promise<ToolResult>, ): void { const wrapped = wrapToolHandler(name, handler); const strictSchema = z.object(inputSchema).strict(); server.registerTool(name, { description, inputSchema: strictSchema }, wrapped); } - src/tools/index.ts:37-38 (registration)Top-level registration: registerWebhookTools(server, client) is called inside registerAllTools().
registerWebhookTools(server, client); }