Skip to main content
Glama
rhettlong

USCardForum MCP Server

by rhettlong

list_users_with_badge

Retrieve community members who have earned a specific achievement badge on the USCardForum platform to identify recognized contributors or track badge distribution.

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

Implementation Reference

  • The MCP tool handler function for 'list_users_with_badge', decorated with @mcp.tool(). Defines input schema via Annotated[Field] and implements logic by calling the API client.
    @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)
  • Re-export/registration of the list_users_with_badge tool by importing it from .users module into server_tools package.
    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, )
  • Top-level registration by importing list_users_with_badge from server_tools into the main server entrypoint, where MCP tools are made available.
    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, )
  • Helper API client method implementing the HTTP request to retrieve users with a specific badge from the /user_badges.json endpoint. Likely called indirectly by the tool handler.
    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)

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