search-feeds
Search for custom feeds on Bluesky using a specific query and limit results to streamline content discovery and access relevant posts efficiently.
Instructions
Search for custom feeds on Bluesky
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of results to fetch (1-100) | |
| query | Yes | Search query for finding feeds |
Implementation Reference
- src/index.ts:457-500 (handler)Full implementation of the 'search-feeds' tool including registration, inline Zod input schema (query: string, limit: number 1-100 default 10), and handler logic that uses Bluesky's unspecced getPopularFeedGenerators API to search feeds, formats results as numbered list with name, URI, description, creator, likes, and handles errors."search-feeds", "Search for custom feeds on Bluesky", { query: z.string().describe("Search query for finding feeds"), limit: z.number().min(1).max(100).default(10).describe("Number of results to fetch (1-100)"), }, async ({ query, limit }) => { if (!agent) { return mcpErrorResponse("Not logged in. Please check your environment variables."); } try { const response = await agent.api.app.bsky.unspecced.getPopularFeedGenerators({ query, limit }); if (!response.success) { return mcpErrorResponse("Failed to search for feeds."); } const { feeds } = response.data; if (!feeds || feeds.length === 0) { return mcpSuccessResponse(`No feeds found for query: "${query}"`); } const results = feeds.map((feed: any, index: number) => { return `Feed #${index + 1}: Name: ${feed.displayName || 'Unnamed Feed'} URI: ${feed.uri} ${feed.description ? `Description: ${feed.description}` : ''} Creator: @${feed.creator.handle} ${feed.creator.displayName ? `(${feed.creator.displayName})` : ''} Likes: ${feed.likeCount || 0} ${feed.indexedAt ? `Indexed At: ${new Date(feed.indexedAt).toLocaleString()}` : ''} ---`; }).join("\n\n"); return mcpSuccessResponse(results); } catch (error) { return mcpErrorResponse(`Error searching for feeds: ${error instanceof Error ? error.message : String(error)}`); } } );