Skip to main content
Glama
rhettlong

USCardForum MCP Server

by rhettlong

list_users_with_badge

Retrieve users who have earned a specific achievement badge on the USCardForum community to identify members with particular recognition levels.

Instructions

List all users who have earned a specific badge.

Args:
    badge_id: The numeric badge ID
    offset: Pagination offset (optional)

Returns a dictionary with user badge information.

Use to find community members with specific achievements
or recognition levels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
badge_idYesThe numeric badge ID
offsetNoPagination offset

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main MCP tool handler implementation for 'list_users_with_badge'. Decorated with @mcp.tool(), defines input schema via Annotated Fields, and delegates to the client API.
    @mcp.tool()
    def list_users_with_badge(
        badge_id: Annotated[
            int,
            Field(description="The numeric badge ID"),
        ],
        offset: Annotated[
            int | None,
            Field(default=None, description="Pagination offset"),
        ] = None,
    ) -> dict[str, Any]:
        """
        List all users who have earned a specific badge.
    
        Args:
            badge_id: The numeric badge ID
            offset: Pagination offset (optional)
    
        Returns a dictionary with user badge information.
    
        Use to find community members with specific achievements
        or recognition levels.
        """
        return get_client().list_user_badges(badge_id, offset=offset)
  • Supporting API helper method in UsersAPI that performs the HTTP GET request to '/user_badges.json' with badge_id and offset parameters.
    def list_users_with_badge(
        self,
        badge_id: int,
        offset: int | None = None,
    ) -> dict[str, Any]:
        """List users with a specific badge.
    
        Args:
            badge_id: Badge ID
            offset: Optional pagination offset
    
        Returns:
            Raw API response with users
        """
        params_list: list[tuple[str, Any]] = [("badge_id", int(badge_id))]
        if offset is not None:
            params_list.append(("offset", int(offset)))
    
        return self._get("/user_badges.json", params=params_list)
  • Client wrapper method list_user_badges that delegates the call to the underlying UsersAPI instance.
    def list_user_badges(
        self,
        badge_id: int,
        offset: int | None = None,
    ) -> dict[str, Any]:
        """List users with a specific badge.
    
        Args:
            badge_id: Badge ID
            offset: Optional pagination offset
    
        Returns:
            Users with the badge
        """
        return self._users.list_users_with_badge(badge_id, offset=offset)
  • Registration via re-export/import in the server_tools __init__.py, making the tool available at the package level.
    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,
    )
  • Import and exposure of the tool in the main server.py entrypoint file.
        list_users_with_badge,
        login,
        research_topic,
        resource_categories,
        resource_hot_topics,
        resource_new_topics,
        search_forum,
        subscribe_topic,
    )
    
    __all__ = [
        "MCP_HOST",
        "MCP_PORT",
        "MCP_TRANSPORT",
        "NITAN_TOKEN",
        "SERVER_INSTRUCTIONS",
        "get_client",
        "main",
        "mcp",
        "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",
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 mentions pagination (via the offset parameter) and describes the return format ('dictionary with user badge information'), which adds useful context beyond the input schema. However, it doesn't disclose important behavioral aspects like rate limits, authentication requirements, error conditions, or what specific fields the dictionary contains.

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 purpose statement, parameter documentation, return information, and usage guidance in four clear sections. It's appropriately sized for a tool with 2 parameters. The only minor improvement would be integrating the usage guidance more seamlessly rather than as a separate sentence.

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, list operation), 100% schema coverage, and the presence of an output schema (implied by 'Returns a dictionary'), the description provides adequate context. It covers purpose, parameters, returns, and usage guidance. The main gap is lack of behavioral details that would be important for a production agent (authentication, rate limits, 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 descriptions verbatim from the schema ('badge_id: The numeric badge ID', 'offset: Pagination offset') without adding additional semantic context, format requirements, or examples. This meets the baseline expectation when schema coverage is complete.

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 ('List all users who have earned a specific badge') and distinguishes it from sibling tools like 'get_user_badges' (which gets badges for a user) or 'get_user_summary' (which provides general user info). It explicitly identifies the resource (users with a badge) and the filtering criteria (badge_id).

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('Use to find community members with specific achievements or recognition levels'), which helps differentiate it from general user listing tools. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools for different scenarios.

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

Install Server

Other Tools

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

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