Skip to main content
Glama
rhettlong

USCardForum MCP Server

by rhettlong

get_user_reactions

Fetch a user's post reactions (likes) to discover their interests and values within the USCardForum community.

Instructions

Fetch a user's post reactions (likes, etc.).

Args:
    username: The user's handle
    offset: Pagination offset (optional)

Returns a UserReactions object with reaction data.

Use to see what content a user has reacted to,
which can indicate their interests and values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesThe user's handle
offsetNoPagination offset

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reactionsNoReaction data

Implementation Reference

  • MCP tool handler for get_user_reactions. Defines input schema with Annotated Fields, calls the client API, and returns UserReactions object. Includes @mcp.tool() decorator for automatic registration.
    def get_user_reactions(
        username: Annotated[
            str,
            Field(description="The user's handle"),
        ],
        offset: Annotated[
            int | None,
            Field(default=None, description="Pagination offset"),
        ] = None,
    ) -> UserReactions:
        """
        Fetch a user's post reactions (likes, etc.).
    
        Args:
            username: The user's handle
            offset: Pagination offset (optional)
    
        Returns a UserReactions object with reaction data.
    
        Use to see what content a user has reacted to,
        which can indicate their interests and values.
        """
        return get_client().get_user_reactions(username, offset=offset)
  • Core API client method that performs the HTTP GET request to fetch user reactions from the Discourse endpoint and parses the response into UserReactions.
    def get_user_reactions(
        self,
        username: str,
        offset: int | None = None,
    ) -> UserReactions:
        """Fetch user's post reactions.
    
        Args:
            username: User handle
            offset: Optional pagination offset
    
        Returns:
            User reactions data
        """
        params_list: list[tuple[str, Any]] = [("username", username)]
        if offset is not None:
            params_list.append(("offset", int(offset)))
    
        payload = self._get(
            "/discourse-reactions/posts/reactions.json",
            params=params_list,
        )
        return UserReactions(reactions=payload.get("reactions", []))
  • Client proxy method that delegates to the users API subclient.
    def get_user_reactions(
        self,
        username: str,
        offset: int | None = None,
    ) -> UserReactions:
        """Fetch user's post reactions.
    
        Args:
            username: User handle
            offset: Optional pagination offset
    
        Returns:
            User reactions data
        """
        return self._users.get_user_reactions(username, offset=offset)
  • Re-export of get_user_reactions from users.py module as part of server_tools package, enabling easy 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,
  • Import of get_user_reactions tool into the MCP server entrypoint, which triggers registration via the @mcp.tool() decorator.
    get_user_reactions,
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 type (UserReactions object), but doesn't address important behavioral aspects like rate limits, authentication requirements, error conditions, or what happens with invalid usernames. The description adds some context about the purpose of reaction data but lacks operational transparency.

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 and appropriately sized with clear sections: purpose statement, args documentation, return statement, and usage context. Each sentence serves a purpose, though the parameter documentation slightly duplicates schema information. The description is front-loaded with the core purpose statement.

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 has an output schema (returns UserReactions object), the description doesn't need to explain return values in detail. With 2 parameters and 100% schema coverage, the description provides adequate context for this read-only data retrieval tool. However, for a tool with no annotations, it could benefit from more behavioral context about authentication, rate limits, 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 ('username: The user's handle', 'offset: Pagination offset') without adding meaningful semantic context beyond what's in the schema. No additional guidance on username format, offset usage patterns, or parameter interactions is provided.

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

Purpose4/5

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

The description clearly states the tool's purpose with 'Fetch a user's post reactions (likes, etc.)' - a specific verb (fetch) and resource (user's post reactions). It distinguishes from siblings like get_user_actions or get_user_summary by focusing specifically on reactions. However, it doesn't explicitly contrast with get_user_replies or get_user_topics which might also involve user content interactions.

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 context with 'Use to see what content a user has reacted to, which can indicate their interests and values.' This suggests when to use it (for interest/value analysis), but doesn't explicitly state when NOT to use it or name specific alternatives among the many sibling tools. No guidance on prerequisites or error conditions is provided.

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