Skip to main content
Glama
raidenrock

USCardForum MCP Server

by raidenrock

get_user_following

Fetch the list of users a member follows on USCardForum to discover influential community members, find related experts, and map social connections.

Instructions

Fetch the list of users that a user follows. 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 users being followed Use to: - Discover influential users in the community - Find related experts - Map social connections

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesThe user's handle
pageNoPage number for pagination

Implementation Reference

  • MCP tool handler decorated with @mcp.tool(). Defines input schema and delegates to client implementation.
    @mcp.tool() def get_user_following( 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 that a user follows. 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 users being followed Use to: - Discover influential users in the community - Find related experts - Map social connections """ return get_client().get_user_following(username, page=page)
  • Core API implementation that makes HTTP request to /u/{username}/follow/following.json and parses response into FollowList using Pydantic models.
    def get_user_following( self, username: str, page: int | None = None, ) -> FollowList: """Fetch users that a user follows. Args: username: User handle page: Optional page number Returns: List of followed users """ params_list: list[tuple[str, Any]] = [] if page is not None: params_list.append(("page", int(page))) payload = self._get( f"/u/{username}/follow/following.json", params=params_list, ) users = [] for u in payload.get("users", []): users.append(FollowUser( id=u.get("id", 0), username=u.get("username", ""), name=u.get("name"), avatar_template=u.get("avatar_template"), )) return FollowList( users=users, total_count=payload.get("total_count", len(users)), )
  • Pydantic models FollowUser and FollowList defining the structure and validation for the tool's output.
    class FollowUser(BaseModel): """A user in a follow list.""" id: int = Field(..., description="User ID") username: str = Field(..., description="Username") name: str | None = Field(None, description="Display name") avatar_template: str | None = Field(None, description="Avatar URL template") class Config: extra = "ignore" 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: extra = "ignore"
  • Imports all MCP tools in the server entrypoint, which triggers registration via @mcp.tool() decorators.
    from uscardforum.server_tools import ( analyze_user, bookmark_post, compare_cards, find_data_points, get_all_topic_posts, get_categories, get_current_session, get_hot_topics, get_new_topics, get_notifications, get_top_topics, get_topic_info, get_topic_posts, get_user_actions, get_user_badges, get_user_followers, get_user_following, get_user_reactions, get_user_replies, get_user_summary, get_user_topics, list_users_with_badge, login, research_topic, resource_categories, resource_hot_topics, resource_new_topics, search_forum, subscribe_topic, )
  • Re-exports the users tools including get_user_following for convenient import.
    from .users import ( get_user_actions, get_user_badges, get_user_followers, get_user_following, get_user_reactions, get_user_replies, get_user_summary, get_user_topics, list_users_with_badge, )

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/raidenrock/uscardforum-mcp'

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