Skip to main content
Glama
klodr

mercury-invoicing-mcp

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

TableJSON Schema
NameRequiredDescriptionDefault
webhookIdYesThe webhook endpoint ID

Implementation Reference

  • 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);
    },
  • 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"),
    },
  • 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);
      },
    );
  • Calls registerWebhookTools(server, client) which registers all webhook tools including mercury_delete_webhook.
    registerWebhookTools(server, client);
  • Maps mercury_delete_webhook to the 'webhooks_delete' rate-limit bucket, shared with other webhook tools.
    mercury_delete_webhook: "webhooks_delete",
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full responsibility and excels: it highlights permanent deletion, event loss, no replay, and loss of delivery history. These behavioral traits go well beyond what the tool name implies, fully informing the agent of risks.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is somewhat verbose but well-structured with bold headings and bullet points. It front-loads the core action and remains organized. Minor redundancy could be trimmed, but overall efficient for the information provided.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a single parameter with full schema coverage, no output schema, and the richness of the description covering purpose, usage, side effects, and return payload, the tool definition is contextually complete. An agent has all necessary information to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema already thoroughly describes `webhookId` (type, format, pattern, description). The description does not add extra parameter semantics beyond the schema. With 100% schema coverage, a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with a clear verb-object pair: 'Delete a webhook endpoint.' It distinguishes itself from sibling tool `mercury_update_webhook` by contrasting with pausing functionality, making its specific purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use (decommissioning scenarios) and when not to use (temporary silence), with references to the alternative `mercury_update_webhook`. Also advises user confirmation due to irreversibility, providing comprehensive decision support.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/klodr/mercury-invoicing-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server