list_subscriptions
Retrieve a combined list of your feed follows and webhook subscriptions, each tagged as 'follow' or 'webhook'.
Instructions
[read] Unified list of the user's feed follows and webhook subscriptions. Each item is tagged kind: 'follow' or 'webhook'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:28-34 (handler)The handler for 'list_subscriptions' tool. Calls GET /api/v1/subscriptions via the FeedbagelClient. No input arguments required (empty schema).
{ name: "list_subscriptions", description: "Unified list of the user's feed follows and webhook subscriptions. Each item is tagged kind: 'follow' or 'webhook'.", scope: "read", inputSchema: z.object({}), handler: (_, c) => c.request("GET", "/api/v1/subscriptions"), - src/tools.ts:28-33 (schema)The tool definition including empty inputSchema (z.object({})), description, and read scope.
{ name: "list_subscriptions", description: "Unified list of the user's feed follows and webhook subscriptions. Each item is tagged kind: 'follow' or 'webhook'.", scope: "read", inputSchema: z.object({}), - src/index.ts:37-43 (registration)MCP server registration of all tools via ListToolsRequestSchema handler, which maps TOOLS to MCP tool format.
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-70 (registration)CallToolRequestSchema handler that dispatches to the correct tool handler by name (including 'list_subscriptions').
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) { - src/client.ts:23-55 (helper)FeedbagelClient.request() - the helper used by the handler to make HTTP requests 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; }