Skip to main content
Glama

get_likes

Retrieve likes for a Bluesky Social post by providing its URI, with options to limit results and paginate through responses.

Instructions

Get likes for a post.

Args:
    ctx: MCP context
    uri: URI of the post to get likes for
    cid: Optional CID of the post (not strictly required)
    limit: Maximum number of results to return (1-100)
    cursor: Optional pagination cursor

Returns:
    List of likes for the post

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriYes
cidNo
limitNo
cursorNo

Implementation Reference

  • The main handler function for the 'get_likes' tool. It is registered via the @mcp.tool() decorator and implements the logic to retrieve likes for a specified post using the Bluesky client, handling parameters like uri, limit, and cursor.
    @mcp.tool()
    def get_likes(
        ctx: Context,
        uri: str,
        cid: Optional[str] = None,
        limit: Union[int, str] = 50,
        cursor: Optional[str] = None,
    ) -> Dict:
        """Get likes for a post.
    
        Args:
            ctx: MCP context
            uri: URI of the post to get likes for
            cid: Optional CID of the post (not strictly required)
            limit: Maximum number of results to return (1-100)
            cursor: Optional pagination cursor
    
        Returns:
            List of likes for the post
        """
        try:
            bluesky_client = get_authenticated_client(ctx)
            params = {"uri": uri, "limit": max(1, min(100, limit))}
            if cursor:
                params["cursor"] = cursor
    
            likes_response = bluesky_client.get_likes(**params)
            likes_data = likes_response.dict()
    
            return {"status": "success", "likes": likes_data}
        except Exception as e:
            error_msg = f"Failed to get likes: {str(e)}"
            return {"status": "error", "message": error_msg}

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/gwbischof/bluesky-social-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server