Skip to main content
Glama
hmumixaM

USCardForum MCP Server

by hmumixaM

get_user_actions

Fetch a user's activity feed on USCardForum with filtering options for likes, posts, topics, replies, and mentions to analyze detailed engagement patterns.

Instructions

Fetch a user's activity feed with optional filtering.

Args:
    username: The user's handle
    filter: Action type filter (optional). Common values:
        - 1: Likes given
        - 2: Likes received
        - 4: Topics created
        - 5: Replies posted
        - 6: Posts (all)
        - 7: Mentions
    offset: Pagination offset (0, 30, 60, ...)

Returns a list of UserAction objects showing what the user has done.

Use this for detailed activity analysis beyond just replies.
For most cases, get_user_replies or get_user_topics are simpler.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesThe user's handle
filterNoAction type filter: 1=likes given, 2=likes received, 4=topics created, 5=replies posted, 6=all posts, 7=mentions
offsetNoPagination offset (0, 30, 60, ...)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'get_user_actions'. Defines input schema with Pydantic Annotated fields and delegates to the DiscourseClient API.
    @mcp.tool()
    def get_user_actions(
        username: Annotated[
            str,
            Field(description="The user's handle"),
        ],
        filter: Annotated[
            int | None,
            Field(
                default=None,
                description="Action type filter: 1=likes given, 2=likes received, 4=topics created, 5=replies posted, 6=all posts, 7=mentions",
            ),
        ] = None,
        offset: Annotated[
            int | None,
            Field(default=None, description="Pagination offset (0, 30, 60, ...)"),
        ] = None,
    ) -> list[UserAction]:
        """
        Fetch a user's activity feed with optional filtering.
    
        Args:
            username: The user's handle
            filter: Action type filter (optional). Common values:
                - 1: Likes given
                - 2: Likes received
                - 4: Topics created
                - 5: Replies posted
                - 6: Posts (all)
                - 7: Mentions
            offset: Pagination offset (0, 30, 60, ...)
    
        Returns a list of UserAction objects showing what the user has done.
    
        Use this for detailed activity analysis beyond just replies.
        For most cases, get_user_replies or get_user_topics are simpler.
        """
        return get_client().get_user_actions(username, filter=filter, offset=offset)
  • Pydantic model defining the structure of UserAction objects returned by the tool.
    class UserAction(BaseModel):
        """A user activity entry (reply, like, etc.)."""
    
        action_type: int | None = Field(None, description="Type of action")
        topic_id: int | None = Field(None, description="Related topic ID")
        post_number: int | None = Field(None, description="Related post number")
        title: str | None = Field(None, description="Topic title")
        excerpt: str | None = Field(None, description="Content preview")
        created_at: datetime | None = Field(None, description="When action occurred")
        username: str | None = Field(None, description="Username who performed action")
        acting_username: str | None = Field(None, description="Acting user")
    
        class Config:
            extra = "ignore"
  • Registration via import and re-export of the get_user_actions tool in the server_tools package __init__.
    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,
    )
  • Main server entrypoint imports and registers all MCP tools including get_user_actions.
    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,
    )
  • Core API helper that performs the HTTP request to /user_actions.json and parses into UserAction models.
    def get_user_actions(
        self,
        username: str,
        *,
        filter: int | None = None,
        offset: int | None = None,
    ) -> list[UserAction]:
        """Fetch user actions/activity.
    
        Args:
            username: User handle
            filter: Optional action filter (e.g., 5 for replies)
            offset: Optional pagination offset
    
        Returns:
            List of user action objects
        """
        params_list: list[tuple[str, Any]] = [("username", username)]
        if filter is not None:
            params_list.append(("filter", int(filter)))
        if offset is not None:
            params_list.append(("offset", int(offset)))
    
        payload = self._get("/user_actions.json", params=params_list)
        actions = payload.get("user_actions", [])
        return [UserAction(**a) for a in actions]
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 discloses that the tool returns a list of UserAction objects and mentions pagination via offset, which adds useful context. However, it lacks details on permissions, rate limits, error handling, or the structure of UserAction objects, leaving behavioral gaps for a tool with no annotation coverage.

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 a clear purpose statement, parameter details in an 'Args' section, return information, and usage guidelines. It's front-loaded and efficient, though the bulleted list for filter values adds some length but is justified for clarity. Every sentence earns its place without redundancy.

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 (3 parameters, no annotations, but with an output schema), the description is fairly complete. It covers purpose, parameters, returns, and usage guidelines. The output schema likely defines UserAction objects, so the description doesn't need to detail return values. However, it could improve by addressing behavioral aspects like authentication or limits.

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 documents all parameters thoroughly. The description adds minimal value beyond the schema by listing common filter values in a bulleted format, but it doesn't provide additional semantics like edge cases or usage examples. 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 specific action ('fetch a user's activity feed') and resource ('user'), distinguishing it from siblings like get_user_replies or get_user_topics by emphasizing 'detailed activity analysis beyond just replies.' It provides a verb+resource+scope combination that is precise and differentiated.

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

Usage Guidelines5/5

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

The description explicitly provides when to use this tool ('for detailed activity analysis beyond just replies') and when not to ('for most cases, get_user_replies or get_user_topics are simpler'), naming specific alternatives. This gives clear guidance on tool selection relative to siblings.

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/hmumixaM/uscardforum-mcp4'

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