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

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,

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