get_hot_topics
Fetch trending topics from USCardForum to identify current community discussions, breaking news, and popular conversations based on engagement metrics.
Instructions
Fetch currently trending/hot topics from USCardForum.
This returns the most actively discussed topics right now, ranked by
engagement metrics like recent replies, views, and likes.
Use this to:
- See what the community is currently discussing
- Find breaking news or time-sensitive opportunities
- Discover popular ongoing discussions
Args:
page: Page number for pagination (0-indexed). Use page=1 to get more topics.
Returns a list of TopicSummary objects with fields:
- id: Topic ID (use with get_topic_posts)
- title: Topic title
- posts_count: Total replies
- views: View count
- like_count: Total likes
- created_at: Creation timestamp
- last_posted_at: Last activity timestamp
Example response interpretation:
A topic with high views but low posts may be informational.
A topic with many recent posts is actively being discussed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for pagination (0-indexed, default: 0) |
Implementation Reference
- The main handler function for the 'get_hot_topics' MCP tool. It is decorated with @mcp.tool(), defines the input schema via Annotated Field, extensive docstring, and delegates to the DiscourseClient via get_client().@mcp.tool() def get_hot_topics( page: Annotated[ int | None, Field(default=None, description="Page number for pagination (0-indexed, default: 0)"), ] = None, ) -> list[TopicSummary]: """ Fetch currently trending/hot topics from USCardForum. This returns the most actively discussed topics right now, ranked by engagement metrics like recent replies, views, and likes. Use this to: - See what the community is currently discussing - Find breaking news or time-sensitive opportunities - Discover popular ongoing discussions Args: page: Page number for pagination (0-indexed). Use page=1 to get more topics. Returns a list of TopicSummary objects with fields: - id: Topic ID (use with get_topic_posts) - title: Topic title - posts_count: Total replies - views: View count - like_count: Total likes - created_at: Creation timestamp - last_posted_at: Last activity timestamp Example response interpretation: A topic with high views but low posts may be informational. A topic with many recent posts is actively being discussed. """ return get_client().get_hot_topics(page=page)
- Pydantic BaseModel defining the TopicSummary schema, which is the return type of get_hot_topics (list[TopicSummary]). Provides input/output validation structure.class TopicSummary(BaseModel): """Summary of a topic for list views (hot, new, top topics).""" id: int = Field(..., description="Unique topic identifier") title: str = Field(..., description="Topic title") posts_count: int = Field(0, description="Total number of posts") views: int = Field(0, description="Total view count") like_count: int = Field(0, description="Total likes on the topic") category_id: int | None = Field(None, description="Category identifier") category_name: str | None = Field(None, description="Category name") created_at: datetime | None = Field(None, description="When topic was created") last_posted_at: datetime | None = Field(None, description="Last activity time") class Config: extra = "ignore"
- src/uscardforum/server_tools/__init__.py:25-28 (registration)Import of the get_hot_topics handler from topics.py into the server_tools package __init__, exposing it for use in the MCP server.from .topics import get_hot_topics, get_new_topics, get_top_topics from .search import search_forum from .categories import get_categories
- src/uscardforum/server_tools/__init__.py:69-69 (registration)Explicit inclusion of 'get_hot_topics' in the __all__ export list of server_tools/__init__.py, registering it for package-level access."get_hot_topics",
- src/uscardforum/server.py:63-63 (registration)Re-export of get_hot_topics in the main server.py __all__, making it available at the top-level for the MCP server entrypoint."get_hot_topics",