Skip to main content
Glama
raidenrock

USCardForum MCP Server

by raidenrock

get_user_topics

Retrieve forum topics created by a specific user to analyze their discussion history, identify expertise areas, and research user interests in credit card communities.

Instructions

Fetch topics created by a specific user.

Args:
    username: The user's handle
    page: Page number for pagination (optional)

Returns a list of topic objects with:
- id: Topic ID
- title: Topic title
- posts_count: Number of replies
- views: View count
- created_at: When created
- category_id: Forum category

Use this to:
- See what discussions a user has initiated
- Find expert users in specific areas
- Research a user's areas of interest

Paginate by incrementing the page parameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesThe user's handle
pageNoPage number for pagination

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary MCP tool handler for 'get_user_topics'. Decorated with @mcp.tool(), defines input schema via Annotated Fields, and delegates to DiscourseClient.get_user_topics() for execution.
    @mcp.tool()
    def get_user_topics(
        username: Annotated[
            str,
            Field(description="The user's handle"),
        ],
        page: Annotated[
            int | None,
            Field(default=None, description="Page number for pagination"),
        ] = None,
    ) -> list[dict[str, Any]]:
        """
        Fetch topics created by a specific user.
    
        Args:
            username: The user's handle
            page: Page number for pagination (optional)
    
        Returns a list of topic objects with:
        - id: Topic ID
        - title: Topic title
        - posts_count: Number of replies
        - views: View count
        - created_at: When created
        - category_id: Forum category
    
        Use this to:
        - See what discussions a user has initiated
        - Find expert users in specific areas
        - Research a user's areas of interest
    
        Paginate by incrementing the page parameter.
        """
        return get_client().get_user_topics(username, page=page)
  • Import of the get_user_topics handler from users.py into the server_tools package, enabling automatic MCP tool registration upon module import.
    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-export and import of get_user_topics in the main server entrypoint, ensuring the tool is available in the MCP server namespace.
    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,
    )
  • Low-level API helper in UsersAPI that performs the HTTP GET request to /topics/created-by/{username}.json to retrieve the list of topics created by the user.
    def get_user_topics(
        self,
        username: str,
        page: int | None = None,
    ) -> list[dict[str, Any]]:
        """Fetch topics created by user.
    
        Args:
            username: User handle
            page: Optional page number
    
        Returns:
            List of topic objects (raw API format)
        """
        params_list: list[tuple[str, Any]] = []
        if page is not None:
            params_list.append(("page", int(page)))
    
        payload = self._get(
            f"/topics/created-by/{username}.json",
            params=params_list,
        )
        topics: list[dict[str, Any]] = payload.get("topic_list", {}).get("topics", [])
        return topics
  • Client wrapper for get_user_topics that calls the API layer and enriches results with category names.
        # Search
        results = client.search("Chase Sapphire")
        ```
    """
    
    def __init__(
        self,
        base_url: str = DEFAULT_BASE_URL,
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 the tool's behavior: it fetches data (read-only implied by 'Fetch'), returns a list of topic objects with specific fields, and includes pagination guidance. It doesn't mention rate limits or authentication needs, but covers the core functionality well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the core purpose, followed by parameter details, return format, usage guidelines, and pagination instruction. Every sentence adds value with no redundancy or wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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, 100% schema coverage, and the presence of an output schema (implied by the detailed return format description), the description is complete. It covers purpose, parameters, return values, usage scenarios, and behavioral aspects like pagination, providing all necessary context for effective tool use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 both parameters. The description adds value by explaining the pagination behavior ('Paginate by incrementing the page parameter') and clarifying the username as 'user's handle', which provides practical usage context beyond the schema's basic descriptions.

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 topics created by a specific user') and resource ('topics'), distinguishing it from sibling tools like get_user_replies or get_user_summary by focusing on topics initiated by the user rather than replies or general user data.

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 usage scenarios ('See what discussions a user has initiated', 'Find expert users in specific areas', 'Research a user's areas of interest'), giving clear context for when to use this tool versus alternatives like get_user_replies or get_topic_info.

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