search-people
Find and retrieve users or actors on Bluesky using a search query, with customizable result limits up to 100 entries.
Instructions
Search for users/actors 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 users |
Implementation Reference
- src/index.ts:412-454 (handler)Full implementation of the 'search-people' tool: registers the tool with schema (query string, optional limit) and handler that uses AtpAgent to search Bluesky actors/users, formats results with display name, handle, DID, bio, stats."search-people", "Search for users/actors on Bluesky", { query: z.string().describe("Search query for finding users"), limit: z.number().min(1).max(100).default(20).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.app.bsky.actor.searchActors({ q: query, limit }); if (!response.success) { return mcpErrorResponse("Failed to search for users."); } const { actors } = response.data; if (actors.length === 0) { return mcpSuccessResponse(`No users found for query: "${query}"`); } const results = actors.map((actor: any, index: number) => { return `User #${index + 1}: Display Name: ${actor.displayName || 'No display name'} Handle: @${actor.handle} DID: ${actor.did} ${actor.description ? `Bio: ${actor.description}` : 'Bio: No bio provided'} ${actor.followersCount !== undefined ? `Followers: ${actor.followersCount}` : ''} ${actor.followsCount !== undefined ? `Following: ${actor.followsCount}` : ''} ${actor.postsCount !== undefined ? `Posts: ${actor.postsCount}` : ''} ${actor.indexedAt ? `Indexed At: ${new Date(actor.indexedAt).toLocaleString()}` : ''} ---`; }).join("\n\n"); return mcpSuccessResponse(results); } catch (error) { return mcpErrorResponse(`Error searching for users: ${error instanceof Error ? error.message : String(error)}`); } } );