get_user_followers_you_know
Identify common followers between users on X (Twitter) by providing a user ID. Retrieve a simulated list of shared connections to analyze mutual relationships.
Instructions
Retrieves a list of common followers (simulated)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| cursor | No | ||
| user_id | Yes |
Implementation Reference
- src/x_twitter_mcp/server.py:157-171 (handler)The handler function for the 'get_user_followers_you_know' tool, decorated with @server.tool for registration. It simulates retrieving common followers by fetching the user's followers using Tweepy v2 API, with rate limiting and pagination support.@server.tool(name="get_user_followers_you_know", description="Retrieves a list of common followers (simulated)") async def get_user_followers_you_know(user_id: str, count: Optional[int] = 100, cursor: Optional[str] = None) -> List[Dict]: """Retrieves a list of common followers. (Simulated as Twitter API v2 doesn't directly support this). Args: user_id (str): The user ID to check for common followers. count (Optional[int]): The number of followers to retrieve and check. Default is 100. cursor (Optional[str]): A pagination token for fetching the user's followers. """ if not check_rate_limit("follow_actions"): raise Exception("Follow action rate limit exceeded") client, _ = initialize_twitter_clients() # Simulate by fetching followers and filtering (v2 doesn't directly support mutual followers) followers = client.get_users_followers(id=user_id, max_results=count, pagination_token=cursor, user_fields=["id", "name", "username"]) return [user.data for user in followers.data][:count]
- src/x_twitter_mcp/server.py:157-157 (registration)The @server.tool decorator registers the 'get_user_followers_you_know' tool with FastMCP server.@server.tool(name="get_user_followers_you_know", description="Retrieves a list of common followers (simulated)")