Skip to main content
Glama

Delete a webhook

lob_webhooks_delete
DestructiveIdempotent

Remove a webhook subscription by providing its ID. Use to manage webhook endpoints.

Instructions

Delete a webhook subscription.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWebhook ID (`ep_…`).

Implementation Reference

  • The handler function for lob_webhooks_delete that executes a DELETE request to /webhooks/{id}
      handler: async ({ id }) => lob.request({ method: "DELETE", path: `/webhooks/${id}` }),
    });
  • Input schema for lob_webhooks_delete — requires a webhook ID matching pattern (whk_ or ep_)
    inputSchema: { id: WH_ID },
  • Registration of the lob_webhooks_delete tool via registerTool in the registerWebhookTools function
    registerTool(server, {
      name: "lob_webhooks_delete",
      annotations: { title: "Delete a webhook", ...ToolAnnotationPresets.destructive },
      description: "Delete a webhook subscription.",
      inputSchema: { id: WH_ID },
      handler: async ({ id }) => lob.request({ method: "DELETE", path: `/webhooks/${id}` }),
    });
  • The top-level registration that wires webhook tools (including lob_webhooks_delete) into the MCP server
      registerWebhookTools(server, lob);
      registerSpecsResources(server);
    }
  • The registerTool helper that wraps the handler with error handling and registers it on the MCP server
    export function registerTool<TShape extends ZodRawShape>(
      server: McpServer,
      def: ToolDefinition<TShape>,
    ): void {
      const a = def.annotations ?? {};
      server.registerTool(
        def.name,
        {
          title: a.title ?? def.name,
          description: def.description,
          inputSchema: def.inputSchema,
          annotations: {
            ...a,
            // Lob is always external; default the hint accordingly.
            openWorldHint: a.openWorldHint ?? true,
          },
        },
        // The SDK's ToolCallback type is parameterised over the exact ZodRawShape and
        // resists the generic erasure here. The runtime contract (validated args in,
        // CallToolResult out) is correct, so we bridge the type boundary with `as never`.
        (async (args: unknown, serverCtx: unknown): Promise<CallToolResult> => {
          try {
            const result = await def.handler(args as never, serverCtx);
            return { content: [{ type: "text", text: stringifyResult(result) }] };
          } catch (err) {
            return {
              isError: true,
              content: [{ type: "text", text: formatErrorForTool(err) }],
            };
          }
        }) as never,
      );
    }
Behavior2/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false, so the description adds no behavioral details beyond stating 'Delete'. It does not mention consequences like irreversibility or impact on related resources.

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

Conciseness5/5

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

A single, direct sentence with no redundancy. Every word is necessary, and the structure is optimally concise.

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

Completeness4/5

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

Given the tool's simplicity (one parameter, no output schema) and annotations providing safety info, the description is largely complete. However, it could mention that deletion is permanent or require confirmation.

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?

The input schema has 100% coverage with a clear description for the single 'id' parameter. The description adds no additional meaning beyond the schema, so baseline score of 3 applies.

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 'Delete a webhook subscription' clearly states the action and resource. The name and title reinforce the purpose, and it distinguishes from sibling tools like create, get, list, and update.

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

Usage Guidelines2/5

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

No guidance provided on when to use this tool versus alternatives (e.g., update or list). The description does not mention prerequisites or situations where deletion is appropriate.

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/optimize-overseas/lob-mcp'

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