Skip to main content
Glama

get_follows

Retrieve a list of users followed by a Bluesky account, supporting pagination for browsing through follows.

Instructions

Get users followed by an account.

Args:
    ctx: MCP context
    handle: Optional handle to get follows for. If None, gets the authenticated user
    limit: Maximum number of results to return (1-100)
    cursor: Optional pagination cursor

Returns:
    List of followed accounts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handleNo
limitNo
cursorNo

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the get_follows tool logic. It retrieves the list of accounts followed by a user (or the authenticated user if no handle provided), handles pagination with limit and cursor, and returns the data wrapped in a success/error dict.
    @mcp.tool()
    def get_follows(
        ctx: Context,
        handle: Optional[str] = None,
        limit: Union[int, str] = 50,
        cursor: Optional[str] = None,
    ) -> Dict:
        """Get users followed by an account.
    
        Args:
            ctx: MCP context
            handle: Optional handle to get follows for. If None, gets the authenticated user
            limit: Maximum number of results to return (1-100)
            cursor: Optional pagination cursor
    
        Returns:
            List of followed accounts
        """
        try:
            bluesky_client = get_authenticated_client(ctx)
    
            # If no handle provided, get authenticated user's follows
            if not handle:
                handle = bluesky_client.me.handle
    
            # Convert limit to int if it's a string
            if isinstance(limit, str):
                limit = int(limit)
            limit = max(1, min(100, limit))
    
            # Call get_follows directly with positional arguments as per the client signature
            follows_response = bluesky_client.get_follows(handle, cursor, limit)
            follows_data = follows_response.dict()
    
            return {"status": "success", "follows": follows_data}
        except Exception as e:
            error_msg = f"Failed to get follows: {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