Skip to main content
Glama
Prototypr

Feedbagel MCP Server

Official
by Prototypr

delete_webhook

Remove a webhook subscription and all its feed attachments by providing the webhook ID.

Instructions

[write] Delete a webhook subscription and all its feed attachments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webhook_idYesWebhook subscriber UUID

Implementation Reference

  • src/tools.ts:72-78 (registration)
    The delete_webhook tool is defined as a ToolDef in the TOOLS array. It accepts a webhook_id string, has write scope, and its handler makes a DELETE request to /api/v1/webhooks/{webhook_id}.
      name: "delete_webhook",
      description: "Delete a webhook subscription and all its feed attachments.",
      scope: "write",
      inputSchema: WebhookIdInput,
      handler: ({ webhook_id }: any, c) =>
        c.request("DELETE", `/api/v1/webhooks/${webhook_id}`),
    },
  • Input schema for delete_webhook: a Zod object requiring a string webhook_id (the webhook subscriber UUID).
    const WebhookIdInput = z.object({
      webhook_id: z.string().describe("Webhook subscriber UUID"),
    });
  • The handler destructures webhook_id from the input and calls c.request with HTTP DELETE method to the path /api/v1/webhooks/{webhook_id}.
    handler: ({ webhook_id }: any, c) =>
      c.request("DELETE", `/api/v1/webhooks/${webhook_id}`),
  • The FeedbagelClient.request method is the HTTP helper that executes the actual fetch call. For delete_webhook, it sends a DELETE request (no body) to api.feedbagel.com/api/v1/webhooks/{webhook_id} with Bearer token auth.
    async request(
      method: string,
      path: string,
      body?: unknown,
    ): Promise<unknown> {
      const res = await fetch(`${this.baseUrl}${path}`, {
        method,
        headers: {
          Authorization: `Bearer ${this.apiKey}`,
          ...(body !== undefined ? { "content-type": "application/json" } : {}),
        },
        body: body !== undefined ? JSON.stringify(body) : undefined,
      });
    
      const text = await res.text();
      let json: unknown = undefined;
      try {
        json = text ? JSON.parse(text) : undefined;
      } catch {
        json = { raw: text };
      }
    
      if (!res.ok) {
        // Surface 429 and 4xx details verbatim so the agent sees the cap info.
        const err: Error & { status?: number; body?: unknown } = new Error(
          `HTTP ${res.status} ${res.statusText}`,
        );
        err.status = res.status;
        err.body = json;
        throw err;
      }
      return json;
    }
  • src/index.ts:45-86 (registration)
    The MCP server registration in index.ts handles the CallToolRequestSchema by looking up the tool by name in the TOOLS array, parsing input with the tool's schema, and dispatching to the tool's handler. This is how delete_webhook gets invoked at runtime.
    server.setRequestHandler(CallToolRequestSchema, async (req) => {
      const tool = TOOLS.find((t) => t.name === req.params.name);
      if (!tool) {
        return {
          isError: true,
          content: [{ type: "text", text: `Unknown tool: ${req.params.name}` }],
        };
      }
      const parsed = tool.inputSchema.safeParse(req.params.arguments ?? {});
      if (!parsed.success) {
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Invalid arguments: ${parsed.error.message}`,
            },
          ],
        };
      }
      try {
        const result = await tool.handler(parsed.data, client);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
        };
      } catch (err) {
        const e = err as Error & { status?: number; body?: unknown };
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: JSON.stringify(
                { error: e.message, status: e.status, body: e.body },
                null,
                2,
              ),
            },
          ],
        };
      }
    });
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It explicitly mentions deletion of the subscription and its feed attachments, making the side effect clear. The '[write]' tag also signals a mutating operation.

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?

The description is a single sentence that immediately conveys the tool's purpose and scope, with no redundant or extraneous information.

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?

The tool has one required parameter and no output schema. The description sufficiently explains what the tool does and what it affects (including feed attachments), leaving no gaps for this simple operation.

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 describing 'webhook_id' as 'Webhook subscriber UUID'. The description does not add additional parameter meaning or format constraints beyond what the schema already provides.

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 clearly states the action (Delete), the resource (webhook subscription), and the extent (all its feed attachments), which distinguishes it from sibling tools like pause_webhook or resume_webhook.

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

Usage Guidelines4/5

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

The description includes a '[write]' tag indicating it is a write operation, and the verb 'delete' implies its primary use. While it does not explicitly list when not to use it, the purpose is straightforward and no ambiguity remains.

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/Prototypr/feedbagel-mcp'

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