Skip to main content
Glama
hmumixaM

USCardForum MCP Server

by hmumixaM

bookmark_post

Save forum posts with optional labels, reminders, and auto-deletion settings for organized reference in the USCardForum community.

Instructions

Bookmark a post for later reference. REQUIRES AUTHENTICATION.

Args:
    post_id: The numeric post ID to bookmark
    name: Optional label/name for the bookmark
    reminder_type: Optional reminder setting
    reminder_at: Optional reminder datetime (ISO format)
    auto_delete_preference: When to auto-delete (default: 3)
        - 0: Never
        - 1: When reminder sent
        - 2: On click
        - 3: Clear after 3 days

Must call login() first.

Returns a Bookmark object with the created bookmark information.

Use to save interesting posts for later reference.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_idYesThe numeric post ID to bookmark
nameNoLabel/name for the bookmark
reminder_typeNoReminder setting
reminder_atNoReminder datetime (ISO format)
auto_delete_preferenceNoWhen to auto-delete: 0=never, 1=when reminder sent, 2=on click, 3=after 3 days (default)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesBookmark ID
nameNoBookmark label
reminder_atNoReminder time
bookmarkable_idYesBookmarked item ID
bookmarkable_typeNoType of bookmarked itemPost
auto_delete_preferenceNoAuto-delete setting

Implementation Reference

  • MCP tool handler for 'bookmark_post' decorated with @mcp.tool(). Defines input schema via Annotated Fields, executes by delegating to client.bookmark_post(), returns Bookmark model.
    @mcp.tool()
    def bookmark_post(
        post_id: Annotated[
            int,
            Field(description="The numeric post ID to bookmark"),
        ],
        name: Annotated[
            str | None,
            Field(default=None, description="Label/name for the bookmark"),
        ] = None,
        reminder_type: Annotated[
            int | None,
            Field(default=None, description="Reminder setting"),
        ] = None,
        reminder_at: Annotated[
            str | None,
            Field(default=None, description="Reminder datetime (ISO format)"),
        ] = None,
        auto_delete_preference: Annotated[
            int | None,
            Field(
                default=3,
                description="When to auto-delete: 0=never, 1=when reminder sent, 2=on click, 3=after 3 days (default)",
            ),
        ] = 3,
    ) -> Bookmark:
        """
        Bookmark a post for later reference. REQUIRES AUTHENTICATION.
    
        Args:
            post_id: The numeric post ID to bookmark
            name: Optional label/name for the bookmark
            reminder_type: Optional reminder setting
            reminder_at: Optional reminder datetime (ISO format)
            auto_delete_preference: When to auto-delete (default: 3)
                - 0: Never
                - 1: When reminder sent
                - 2: On click
                - 3: Clear after 3 days
    
        Must call login() first.
    
        Returns a Bookmark object with the created bookmark information.
    
        Use to save interesting posts for later reference.
        """
        return get_client().bookmark_post(
            post_id,
            name=name,
            reminder_type=reminder_type,
            reminder_at=reminder_at,
            auto_delete_preference=auto_delete_preference,
        )
  • Core API implementation in AuthAPI.bookmark_post: constructs form data, adds CSRF, performs HTTP POST to /bookmarks.json, parses response into Bookmark.
    def bookmark_post(
        self,
        post_id: int,
        name: str | None = None,
        reminder_type: int | None = None,
        reminder_at: str | None = None,
        auto_delete_preference: int | None = 3,
    ) -> Bookmark:
        """Bookmark a post (requires auth).
    
        Args:
            post_id: Post ID to bookmark
            name: Optional bookmark name
            reminder_type: Optional reminder type
            reminder_at: Optional reminder datetime (ISO format)
            auto_delete_preference: Auto-delete setting (default: 3)
    
        Returns:
            Created bookmark
        """
        self._require_auth()
        token = self._csrf_token or self.fetch_csrf_token()
    
        form: dict[str, Any] = {
            "bookmarkable_type": "Post",
            "bookmarkable_id": int(post_id),
        }
        if name is not None:
            form["name"] = name
        if reminder_type is not None:
            form["reminder_type"] = str(reminder_type)
        if reminder_at is not None:
            form["reminder_at"] = reminder_at
        if auto_delete_preference is not None:
            form["auto_delete_preference"] = str(int(auto_delete_preference))
    
        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}/",
        }
    
        payload = self._post("/bookmarks.json", data=form, headers=headers)
        return Bookmark(
            id=payload.get("id", 0),
            bookmarkable_id=post_id,
            bookmarkable_type="Post",
            name=name,
            auto_delete_preference=auto_delete_preference or 3,
        )
  • Client wrapper DiscourseClient.bookmark_post: delegates to self._auth.bookmark_post (AuthAPI). Called by MCP tool via get_client().
    def bookmark_post(
        self,
        post_id: int,
        name: str | None = None,
        reminder_type: int | None = None,
        reminder_at: str | None = None,
        auto_delete_preference: int | None = 3,
    ) -> Bookmark:
        """Bookmark a post (requires auth).
    
        Args:
            post_id: Post ID to bookmark
            name: Optional bookmark name
            reminder_type: Optional reminder type
            reminder_at: Optional reminder datetime
            auto_delete_preference: Auto-delete setting (default: 3)
    
        Returns:
            Created bookmark
        """
        return self._auth.bookmark_post(
            post_id,
            name=name,
            reminder_type=reminder_type,
            reminder_at=reminder_at,
            auto_delete_preference=auto_delete_preference,
        )
  • Re-exports bookmark_post from .auth in server_tools __init__.py for package-level access and MCP tool discovery.
    from .auth import (
        login,
        get_current_session,
        get_notifications,
        bookmark_post,
        subscribe_topic,
    )
  • Imports bookmark_post (line 17) and all MCP tools into main server.py entrypoint, enabling auto-registration via @mcp.tool() decorators.
    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 communicates authentication requirements, the mutation nature of the operation (bookmark creation), and the return format (Bookmark object). However, it doesn't mention potential side effects like duplicate bookmarks, error conditions, or rate limits.

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 purpose statement, authentication requirement, parameter details, prerequisite, return value, and usage reinforcement. While slightly longer than minimal, every sentence adds value. The parameter explanations could be more concise.

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?

For a mutation tool with no annotations but with output schema (implied by 'Returns a Bookmark object'), the description is mostly complete. It covers authentication, parameters, prerequisites, and return format. However, it lacks information about error conditions, idempotency, or what happens when bookmarking already-bookmarked posts.

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?

With 100% schema description coverage, the baseline is 3. The description adds significant value by explaining the auto_delete_preference parameter's enum values (0-3 with meanings) and clarifying that post_id is numeric. However, it doesn't provide additional context for reminder_type beyond what's in the schema.

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 ('Bookmark a post') and resource ('post for later reference'), distinguishing it from sibling tools which are primarily get/read operations. The final sentence reinforces the purpose by stating 'Use to save interesting posts for later reference.'

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 states when to use this tool ('Must call login() first') and provides clear prerequisites (authentication requirement). It also distinguishes from sibling tools by being the only bookmarking/mutation tool among primarily read-only operations.

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