Skip to main content
Glama
hmumixaM

USCardForum MCP Server

by hmumixaM

get_user_followers

Retrieve followers for a specific user on USCardForum to identify influential community members and analyze user connections.

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
NameRequiredDescriptionDefault
usernameYesThe user's handle
pageNoPage number for pagination

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
usersNoUser list
total_countNoTotal users

Implementation Reference

  • MCP tool handler decorated with @mcp.tool(). Defines input schema using Annotated and Field for username and optional page. Docstring describes functionality and returns FollowList. Delegates to client.get_user_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)
  • Imports all MCP tools including get_user_followers from server_tools into the main server module, enabling automatic registration in the FastMCP server.
    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,
    )
  • Core client API method that performs HTTP GET request to Discourse endpoint /u/{username}/follow/followers.json, parses JSON payload into list of FollowUser objects wrapped in FollowList.
    def get_user_followers(
        self,
        username: str,
        page: int | None = None,
    ) -> FollowList:
        """Fetch users following a user.
    
        Args:
            username: User handle
            page: Optional page number
    
        Returns:
            List of follower 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/followers.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)),
        )
  • Re-exports get_user_followers from users.py module into server_tools package __init__, making it available for import in server.py.
    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,
    )
  • Client wrapper method that delegates get_user_followers call to the internal _users API submodule.
    def get_user_followers(
        self,
        username: str,
        page: int | None = None,
    ) -> FollowList:
        """Fetch users following a user.
    
        Args:
            username: User handle
            page: Optional page number
    
        Returns:
            List of follower users
        """
        return self._users.get_user_followers(username, page=page)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the core behavior (fetching followers with pagination) and return format, but lacks details on permissions, rate limits, error conditions, or whether data is cached. The mention of pagination is helpful but incomplete without explaining page size or total pages.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for purpose, arguments, and returns, but includes an unnecessary editorial comment ('A high follower count often indicates...') that doesn't help tool selection. The core information is front-loaded and generally efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, pagination), no annotations, but with a detailed output schema (implied by the Returns section), the description is reasonably complete. It covers the basic operation and return structure, though it could better address behavioral aspects like authentication needs or error handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents both parameters. The description repeats the parameter explanations verbatim from the schema ('username: The user's handle', 'page: Page number for pagination') without adding any additional semantic context, such as username format constraints or pagination defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Fetch the list') and resource ('users following a specific user'), distinguishing it from sibling tools like get_user_following (which fetches users being followed) and get_user_summary (which provides broader user data). The verb 'fetch' precisely indicates a retrieval operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like get_user_summary (which might include follower count) or get_user_following (which retrieves the inverse relationship). It also doesn't mention prerequisites such as authentication or rate limits, leaving usage context unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.