Skip to main content
Glama
raidenrock

USCardForum MCP Server

by raidenrock

list_users_with_badge

Find community members who have earned a specific achievement badge on USCardForum. Use this tool to identify users with particular recognition levels by providing a badge ID.

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

  • MCP tool handler for 'list_users_with_badge'. Defines input parameters with descriptions (serving as schema) and implements the logic by calling the underlying 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)
  • Underlying API client method that performs the HTTP request to /user_badges.json to retrieve users with the specified badge.
    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)
  • Import statement in server_tools/__init__.py that includes list_users_with_badge, exporting the tool for use in the MCP server.
    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,
    )
  • Import and __all__ entry in the main server.py entrypoint file, ensuring the tool is registered when the server starts.
        get_user_topics,
        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?

No annotations are provided, so the description carries the full burden. It mentions pagination via the 'offset' parameter and implies read-only behavior by describing a list operation, but lacks details on rate limits, authentication needs, or what specific information is included in the returned dictionary. The description adds some behavioral context but is incomplete for a tool with no annotations.

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

Conciseness5/5

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

The description is well-structured and front-loaded with the core purpose, followed by parameter details and usage context. Every sentence earns its place without redundancy, making it efficient and easy to parse.

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 that an output schema exists, the description does not need to explain return values. It covers the tool's purpose, parameters, and usage context adequately. However, with no annotations and a read operation, it could benefit from more behavioral details like pagination behavior or error handling, leaving minor gaps.

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

Parameters4/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 documents both parameters fully. The description adds minimal value by briefly mentioning 'badge_id' and 'offset' in the Args section, but does not provide additional semantics beyond what the schema offers. With high schema coverage, the baseline is 3, but the explicit Args listing slightly enhances clarity, warranting a 4.

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') with the resource ('users'), distinguishing it from sibling tools like 'get_user_badges' (which gets badges for a user rather than users for a badge). The purpose is precise and unambiguous.

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-related tools. However, it does not explicitly mention when not to use it or name specific alternatives among siblings, such as 'get_user_badges' for a different perspective.

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

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