Skip to main content
Glama
raidenrock

USCardForum MCP Server

by raidenrock

get_user_badges

Retrieve user badges from USCardForum to assess participation milestones, community recognition, and special achievements for trustworthiness evaluation.

Instructions

Fetch badges earned by a user.

Args:
    username: The user's handle
    grouped: Group badges by type (default: True)

Returns a UserBadges object with:
- badges: List of Badge objects with name, description, granted_at
- badge_types: Badge type information

Badges indicate:
- Participation milestones (first post, anniversaries)
- Community recognition (editor, leader)
- Special achievements

Use to assess user experience and trustworthiness.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesThe user's handle
groupedNoGroup badges by type (default: True)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
badgesNoEarned badges
badge_typesNoBadge type info

Implementation Reference

  • The MCP tool handler for 'get_user_badges'. Decorated with @mcp.tool(), which registers the tool and defines input schema using Annotated[ ] with pydantic Field for username and grouped parameters. Executes by calling get_client().get_user_badges(username, grouped=grouped) and returns UserBadges.
    @mcp.tool()
    def get_user_badges(
        username: Annotated[
            str,
            Field(description="The user's handle"),
        ],
        grouped: Annotated[
            bool,
            Field(default=True, description="Group badges by type (default: True)"),
        ] = True,
    ) -> UserBadges:
        """
        Fetch badges earned by a user.
    
        Args:
            username: The user's handle
            grouped: Group badges by type (default: True)
    
        Returns a UserBadges object with:
        - badges: List of Badge objects with name, description, granted_at
        - badge_types: Badge type information
    
        Badges indicate:
        - Participation milestones (first post, anniversaries)
        - Community recognition (editor, leader)
        - Special achievements
    
        Use to assess user experience and trustworthiness.
        """
        return get_client().get_user_badges(username, grouped=grouped)
  • Imports get_user_badges from .users module, making it available for use and registration in the server tools package.
    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,
    )
  • Re-exports get_user_badges from server_tools, ensuring the tool is imported and registered when server.py is run.
        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,
    )
    
    __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",
        "login",
        "resource_categories",
        "resource_hot_topics",
        "resource_new_topics",
        "search_forum",
        "subscribe_topic",
        "research_topic",
    ]
Behavior4/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 what the tool returns (a UserBadges object with specific fields) and explains the significance of badges (e.g., participation milestones, community recognition). It also clarifies the default behavior for the 'grouped' parameter. However, it does not cover potential errors, rate limits, or authentication needs, leaving some behavioral aspects unspecified.

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 (purpose, args, returns, badge significance, usage), making it easy to parse. It is appropriately sized, though the 'Args' section slightly repeats schema information. Most sentences add value, such as explaining badge types and usage context, with minimal waste.

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, no annotations, but with an output schema), the description is largely complete. It explains the purpose, parameters, return structure, and usage context. Since an output schema exists, it does not need to detail return values extensively. However, it could improve by addressing potential errors or authentication requirements, which are not covered.

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?

The schema description coverage is 100%, meaning the input schema already documents both parameters ('username' and 'grouped') with descriptions and defaults. The description repeats some of this information in the 'Args' section but adds minimal extra meaning beyond what the schema provides, such as clarifying that 'username' is a handle. This meets the baseline for high schema coverage.

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 verb ('Fetch') and resource ('badges earned by a user'), making the purpose specific. It distinguishes this tool from siblings like 'get_user_summary' or 'list_users_with_badge' by focusing on badge retrieval for a specific user rather than general user data or badge listings across users.

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

Usage Guidelines3/5

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

The description provides implied usage by stating 'Use to assess user experience and trustworthiness,' which gives context for when to employ this tool. However, it lacks explicit guidance on when to choose this over alternatives like 'get_user_summary' or 'list_users_with_badge,' and does not mention any exclusions or prerequisites.

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