Skip to main content
Glama
raidenrock

USCardForum MCP Server

by raidenrock

subscribe_topic

Set notification preferences for USCardForum topics to control when you receive updates, from muting to watching all posts.

Instructions

Set your notification level for a topic. REQUIRES AUTHENTICATION.

Args:
    topic_id: The topic ID to subscribe to
    level: Notification level:
        - 0: Muted (no notifications)
        - 1: Normal (only if mentioned)
        - 2: Tracking (notify on replies to your posts)
        - 3: Watching (notify on all new posts)

Must call login() first.

Returns a SubscriptionResult with:
- success: Whether subscription succeeded
- notification_level: The new notification level

Use to:
- Watch topics for all updates (level=3)
- Mute noisy topics (level=0)
- Track topics you've contributed to (level=2)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topic_idYesThe topic ID to subscribe to
levelNoNotification level: 0=muted, 1=normal, 2=tracking (default), 3=watching

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYesWhether subscription succeeded
notification_levelNoNew notification level

Implementation Reference

  • The primary MCP tool handler for 'subscribe_topic'. Decorated with @mcp.tool(), defines input parameters with descriptions (serving as schema), includes comprehensive docstring, and delegates execution to the client implementation.
    @mcp.tool()
    def subscribe_topic(
        topic_id: Annotated[
            int,
            Field(description="The topic ID to subscribe to"),
        ],
        level: Annotated[
            int,
            Field(
                default=2,
                description="Notification level: 0=muted, 1=normal, 2=tracking (default), 3=watching",
            ),
        ] = 2,
    ) -> SubscriptionResult:
        """
        Set your notification level for a topic. REQUIRES AUTHENTICATION.
    
        Args:
            topic_id: The topic ID to subscribe to
            level: Notification level:
                - 0: Muted (no notifications)
                - 1: Normal (only if mentioned)
                - 2: Tracking (notify on replies to your posts)
                - 3: Watching (notify on all new posts)
    
        Must call login() first.
    
        Returns a SubscriptionResult with:
        - success: Whether subscription succeeded
        - notification_level: The new notification level
    
        Use to:
        - Watch topics for all updates (level=3)
        - Mute noisy topics (level=0)
        - Track topics you've contributed to (level=2)
        """
        return get_client().subscribe_topic(topic_id, level=level)
  • Pydantic model defining the output schema for the subscribe_topic tool response.
    class SubscriptionResult(BaseModel):
        """Result of subscribing to a topic."""
    
        success: bool = Field(..., description="Whether subscription succeeded")
        notification_level: NotificationLevel = Field(
            NotificationLevel.NORMAL, description="New notification level"
        )
    
        class Config:
            extra = "ignore"
  • Core implementation logic in AuthAPI class that performs the HTTP POST request to the forum's notifications endpoint to set the topic subscription level.
    def subscribe_topic(
        self,
        topic_id: int,
        level: NotificationLevel = NotificationLevel.TRACKING,
    ) -> SubscriptionResult:
        """Set topic notification level (requires auth).
    
        Args:
            topic_id: Topic ID
            level: Notification level (MUTED, NORMAL, TRACKING, WATCHING)
    
        Returns:
            Subscription result
        """
        self._require_auth()
        if not isinstance(level, NotificationLevel):
            level = NotificationLevel(level)
    
        token = self._csrf_token or self.fetch_csrf_token()
    
        headers = {
            "Accept": "*/*",
            "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
            "X-CSRF-Token": token,
            "X-Requested-With": "XMLHttpRequest",
            "Referer": f"{self._base_url}/t/{int(topic_id)}",
        }
    
        self._post(
            f"/t/{int(topic_id)}/notifications",
            data={"notification_level": str(int(level))},
            headers=headers,
        )
    
        return SubscriptionResult(success=True, notification_level=level)
  • Explicit import of the subscribe_topic tool in the main server entrypoint, which triggers registration via the @mcp.tool() decorator when the module is imported.
    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,
    )
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 successfully reveals key traits: authentication requirement ('REQUIRES AUTHENTICATION'), mutation nature (implied by 'Set'), and return format ('Returns a SubscriptionResult with...'). However, it doesn't mention potential side effects like rate limits or whether this affects other users' notifications.

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: purpose first, then authentication requirement, followed by parameter details, prerequisites, return values, and usage examples. Every sentence serves a distinct purpose with zero wasted text. The bulleted lists improve readability without adding fluff.

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 (2 parameters, authentication requirement), the description provides complete context. It covers purpose, authentication, parameters, prerequisites, return values, and usage scenarios. With an output schema present, it appropriately doesn't over-explain return values. This is comprehensive for a subscription management tool.

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 thoroughly. The description adds marginal value by restating the level enum meanings in a more readable format and emphasizing the default value context. This slightly enhances understanding beyond the schema's technical documentation.

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 starts with a clear verb+resource statement: 'Set your notification level for a topic.' It specifically distinguishes this tool from siblings like 'get_topic_info' or 'get_notifications' by focusing on subscription management rather than information retrieval. The purpose is immediately apparent 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 provides explicit usage guidance: 'Must call login() first' establishes a prerequisite, and the 'Use to:' section lists specific scenarios (watch topics, mute noisy topics, track contributions) with corresponding level values. This gives clear context for when to use this tool versus alternatives like 'get_notifications' for reading notifications.

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