get_user_followers
Fetch followers for a specific USCardForum user to identify influential community members and analyze user engagement.
Instructions
Fetch the list of users following a specific user.
Args:
username: The user's handle
page: Page number for pagination (optional)
Returns a FollowList object with:
- users: List of FollowUser objects
- total_count: Total followers
A high follower count often indicates an influential
or helpful community member.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | The user's handle | |
| page | No | Page number for pagination |
Implementation Reference
- The MCP tool handler for 'get_user_followers', decorated with @mcp.tool(). Delegates to client.get_user_followers() to fetch the list of followers.@mcp.tool() def get_user_followers( username: Annotated[ str, Field(description="The user's handle"), ], page: Annotated[ int | None, Field(default=None, description="Page number for pagination"), ] = None, ) -> FollowList: """ Fetch the list of users following a specific user. Args: username: The user's handle page: Page number for pagination (optional) Returns a FollowList object with: - users: List of FollowUser objects - total_count: Total followers A high follower count often indicates an influential or helpful community member. """ return get_client().get_user_followers(username, page=page)
- Pydantic BaseModel defining the output type FollowList returned by the get_user_followers tool.class FollowList(BaseModel): """List of followed/following users.""" users: list[FollowUser] = Field(default_factory=list, description="User list") total_count: int = Field(0, description="Total users") class Config:
- src/uscardforum/server_tools/__init__.py:37-47 (registration)Package-level import and re-export of the get_user_followers tool from the users submodule.from .users import ( get_user_summary, get_user_topics, get_user_replies, get_user_actions, get_user_badges, get_user_following, get_user_followers, get_user_reactions, list_users_with_badge, )
- src/uscardforum/server.py:71-71 (registration)Explicit inclusion of get_user_followers in the __all__ export of the main server module, ensuring tool availability."get_user_followers",