Skip to main content
Glama
hmumixaM

USCardForum MCP Server

by hmumixaM

subscribe_topic

Set notification preferences for USCardForum topics to control when you receive alerts. Choose from muted, normal, tracking, or watching levels to manage your forum notifications effectively.

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

  • MCP tool handler for subscribe_topic. Decorated with @mcp.tool(), defines input schema via Annotated Fields, calls the client implementation, returns SubscriptionResult.
    @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 subscribe_topic tool: success boolean and notification_level enum.
    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"
  • Imports subscribe_topic from auth.py into server_tools namespace, grouping it under Auth tools for exposure to MCP server.
    from .auth import (
        login,
        get_current_session,
        get_notifications,
        bookmark_post,
        subscribe_topic,
    )
  • Imports subscribe_topic into the main MCP server entrypoint, adding it to __all__ for automatic @mcp.tool() registration.
        resource_new_topics,
        search_forum,
        subscribe_topic,
    )
  • Low-level API implementation in AuthAPI that performs the HTTP POST to set topic notification level, called by client.subscribe_topic.
    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)
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 authentication requirement ('REQUIRES AUTHENTICATION'), the mutation nature of setting notification levels, and the return structure. However, it lacks details on error conditions, rate limits, or side effects like whether this affects other users.

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 organized sections for arguments, prerequisites, returns, and usage examples. Every sentence adds value without redundancy, making it efficient and easy to parse.

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, mutation operation), no annotations, but with an output schema, the description is complete. It covers authentication needs, parameter semantics, return values, and usage scenarios, providing sufficient context for an agent to invoke it correctly without relying on structured fields alone.

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?

The schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the semantic meaning of 'level' values with clear examples (0=muted, 1=normal, etc.) and use cases, which enhances understanding beyond the schema's technical definitions. It doesn't add much for 'topic_id' but compensates well for 'level'.

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 ('Set your notification level for a topic') and resource ('topic'), distinguishing it from siblings like 'bookmark_post' or 'get_topic_info' which perform different operations on topics. It explicitly defines the verb and target, making the purpose unambiguous.

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 guidance on when to use this tool ('Use to: Watch topics for all updates, Mute noisy topics, Track topics you've contributed to') and includes prerequisites ('Must call login() first'). It also distinguishes usage scenarios by notification levels, though it doesn't explicitly name alternatives among 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