Skip to main content
Glama
hmumixaM

USCardForum MCP Server

by hmumixaM

get_user_topics

Retrieve topics created by a specific user on USCardForum to analyze their discussion contributions and identify areas of expertise.

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

  • MCP tool handler for get_user_topics. Decorated with @mcp.tool(), defines input schema via Annotated Fields, docstring describes usage, and delegates to client.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)
  • Re-exports get_user_topics from users.py module, making it available at the server_tools package level for use in server.py and MCP server.
    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,
    )
  • Client class method that fetches user topics via UsersAPI and enriches with category names.
    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
        """
        topics = self._users.get_user_topics(username, page=page)
        return self._enrich_with_categories(topics)
  • Low-level API implementation that calls Discourse endpoint /topics/created-by/{username}.json to retrieve the list of topics.
    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,
        )
        return payload.get("topic_list", {}).get("topics", [])
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the pagination behavior ('Paginate by incrementing the page parameter') and the return format (list of topic objects with specific fields), but doesn't mention rate limits, authentication requirements, or error conditions that might be relevant for a user query tool.

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 statement, args explanation, returns format, and usage guidelines. It's appropriately sized but could be slightly more concise by avoiding repetition of parameter descriptions already in the schema.

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 (implied by 'Returns a list of topic objects'), the description doesn't need to explain return values in detail. It provides good context about usage scenarios and pagination behavior, though it could benefit from mentioning authentication requirements or error handling for a user query tool.

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 both parameters fully. The description repeats the parameter explanations but doesn't add meaningful semantics beyond what's in the schema (e.g., format constraints for username, pagination strategy details). Baseline 3 is appropriate when schema does the heavy lifting.

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 'topics created by a specific user', distinguishing it from siblings like get_user_replies or get_user_actions which focus on different user activities. It specifies the exact scope of what's being retrieved.

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 provides explicit use cases: 'See what discussions a user has initiated', 'Find expert users in specific areas', and 'Research a user's areas of interest'. It also mentions pagination guidance, though it doesn't explicitly contrast with alternatives like get_user_replies.

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