Skip to main content
Glama
Prototypr

Feedbagel MCP Server

Official
by Prototypr

attach_feed_to_webhook

Attach a feed to a webhook subscription to automatically deliver new entries.

Instructions

[write] Attach a feed to a webhook subscription so its new entries get delivered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webhook_idYesWebhook subscriber UUID
feed_idYesNumeric feed id

Implementation Reference

  • The tool definition for 'attach_feed_to_webhook' including its handler function. The handler destructures webhook_id and feed_id from input and sends a POST request to /api/v1/webhooks/${webhook_id}/feeds with the feed_id in the body.
    {
      name: "attach_feed_to_webhook",
      description:
        "Attach a feed to a webhook subscription so its new entries get delivered.",
      scope: "write",
      inputSchema: WebhookIdInput.merge(FeedIdInput),
      handler: ({ webhook_id, feed_id }: any, c) =>
        c.request("POST", `/api/v1/webhooks/${webhook_id}/feeds`, {
          feed_id,
        }),
  • FeedIdInput and WebhookIdInput Zod schemas used by the tool. The tool's inputSchema merges both: feed_id (positive integer) and webhook_id (UUID string).
    const FeedIdInput = z.object({
      feed_id: z.number().int().positive().describe("Numeric feed id"),
    });
    
    const WebhookIdInput = z.object({
      webhook_id: z.string().describe("Webhook subscriber UUID"),
    });
  • src/index.ts:37-43 (registration)
    The MCP server registers all tools from the TOOLS array. When ListToolsRequestSchema is received, it maps each tool (including attach_feed_to_webhook) to its name, description, and JSON schema. When CallToolRequestSchema is received, it finds the tool by name, validates input, and invokes the handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS.map((t) => ({
        name: t.name,
        description: `[${t.scope}] ${t.description}`,
        inputSchema: zodToJsonSchema(t.inputSchema, { target: "openApi3" }),
      })),
    }));
  • The FeedbagelClient.request() helper method that the tool handler calls. It sends an HTTP request with Bearer token auth to the feedbagel API.
      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;
      }
    }
Behavior2/5

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

The description includes a '[write]' prefix indicating mutation, and states that attaching leads to delivery of entries. However, it fails to disclose key behavioral traits such as idempotency (what happens if already attached?), potential side effects, or required permissions. With no annotations provided, the description carries the full burden for transparency, which is insufficient.

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, efficient sentence that conveys the core action and purpose. The '[write]' prefix is a concise convention. There is no wasted text, and the structure is front-loaded with the most critical information.

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?

For a simple tool with two clear parameters and no output schema, the description adequately covers the purpose and effect. However, it could be improved by noting potential error conditions (e.g., webhook not found) or idempotency behavior. Given the low complexity, the existing description is nearly complete.

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 descriptions for both parameters ('Webhook subscriber UUID' and 'Numeric feed id'). The description adds no additional meaning beyond what the schema already provides, meeting the baseline expectation. No extra context is given.

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 specifies the action ('Attach'), the objects involved ('feed' to 'webhook subscription'), and the purpose ('so its new entries get delivered'). It effectively distinguishes this tool from siblings like 'create_webhook' and 'detach_feed_from_webhook' by focusing on the attachment operation.

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

Usage Guidelines3/5

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

The description implies the tool is used when you want a feed's entries delivered via webhook, but provides no explicit guidance on prerequisites (e.g., webhook must exist) or when not to use it. No comparison to alternatives beyond the implied complementarity with 'detach_feed_from_webhook'.

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