detach_feed_from_webhook
Stop delivering entries from a specific feed to a webhook subscription. Provide the webhook subscriber UUID and numeric feed ID.
Instructions
[write] Stop delivering a feed's entries to a webhook subscription.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| webhook_id | Yes | Webhook subscriber UUID | |
| feed_id | Yes | Numeric feed id |
Implementation Reference
- src/tools.ts:108-116 (handler)The handler function for detach_feed_from_webhook that makes a DELETE request to /api/v1/webhooks/{webhook_id}/feeds/{feed_id} to stop delivering a feed's entries to a webhook subscription.
name: "detach_feed_from_webhook", description: "Stop delivering a feed's entries to a webhook subscription.", scope: "write", inputSchema: WebhookIdInput.merge(FeedIdInput), handler: ({ webhook_id, feed_id }: any, c) => c.request( "DELETE", `/api/v1/webhooks/${webhook_id}/feeds/${feed_id}`, ), - src/tools.ts:19-25 (schema)Schema definitions: FeedIdInput (z.object with numeric feed_id) and WebhookIdInput (z.object with string webhook_id), which are merged (WebhookIdInput.merge(FeedIdInput)) to form the input schema for detach_feed_from_webhook.
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 tool registration via MCP's ListToolsRequestSchema handler, which maps over the TOOLS array (including detach_feed_from_webhook) exposing name, description, and JSON schema to the MCP client.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS.map((t) => ({ name: t.name, description: `[${t.scope}] ${t.description}`, inputSchema: zodToJsonSchema(t.inputSchema, { target: "openApi3" }), })), })); - src/index.ts:45-86 (registration)The tool invocation dispatcher (CallToolRequestSchema handler) that looks up the tool by name (including detach_feed_from_webhook), validates input via the schema, and calls the handler with the parsed data.
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, ), }, ], }; } });