get_follows
Retrieve a list of accounts followed by a specific user on Bluesky Social MCP. Specify handle, limit, and optional cursor for paginated results.
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
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | ||
| handle | No | ||
| limit | No |
Implementation Reference
- server.py:157-195 (handler)The handler function for the 'get_follows' tool. It retrieves the list of accounts followed by a specified handle (or the authenticated user's handle if none provided), handling pagination with limit and cursor parameters. Uses the Bluesky client to fetch the data and wraps the response in a standard success/error format.@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}