Skip to main content
Glama
rhettlong

USCardForum MCP Server

by rhettlong

search_forum

Search USCardForum for credit card and points discussions using advanced query operators to filter by title, author, category, tags, or date.

Instructions

Search USCardForum for topics and posts matching a query. Args: query: Search query string. Supports Discourse operators: - Basic: "chase sapphire bonus" - In title only: "chase sapphire in:title" - By author: "@username chase" - In category: "category:credit-cards chase" - With tag: "#amex bonus" - Exact phrase: '"sign up bonus"' - Exclude: "chase -sapphire" - Time: "after:2024-01-01" or "before:2024-06-01" page: Page number for pagination (starts at 1) order: Sort order for results. Options: - "relevance": Best match (default) - "latest": Most recent first - "views": Most viewed - "likes": Most liked - "activity": Recent activity - "posts": Most replies Returns a SearchResult object with: - posts: List of matching SearchPost objects with excerpts - topics: List of matching SearchTopic objects - users: List of matching SearchUser objects - grouped_search_result: Metadata about result counts Example queries: - "Chase Sapphire Reserve order:latest" - Recent CSR discussions - "AMEX popup in:title" - Topics about AMEX popup in title - "data point category:credit-cards" - Data points in CC category - "@expert_user order:likes" - Most liked posts by a user Pagination: If more results exist, increment page parameter.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query string. Supports operators: 'in:title', '@username', 'category:name', '#tag', 'after:date', 'before:date'
pageNoPage number for pagination (starts at 1)
orderNoSort order: 'relevance' (default), 'latest', 'views', 'likes', 'activity', or 'posts'

Implementation Reference

  • Core handler for the 'search_forum' MCP tool. Includes inline input schema definitions using Pydantic's Annotated and Field for parameters query, page, order. Executes forum search via get_client().search() and returns SearchResult object.
    @mcp.tool() def search_forum( query: Annotated[ str, Field( description="Search query string. Supports operators: 'in:title', '@username', 'category:name', '#tag', 'after:date', 'before:date'" ), ], page: Annotated[ int | None, Field(default=None, description="Page number for pagination (starts at 1)"), ] = None, order: Annotated[ str | None, Field( default=None, description="Sort order: 'relevance' (default), 'latest', 'views', 'likes', 'activity', or 'posts'", ), ] = None, ) -> SearchResult: """ Search USCardForum for topics and posts matching a query. Args: query: Search query string. Supports Discourse operators: - Basic: "chase sapphire bonus" - In title only: "chase sapphire in:title" - By author: "@username chase" - In category: "category:credit-cards chase" - With tag: "#amex bonus" - Exact phrase: '"sign up bonus"' - Exclude: "chase -sapphire" - Time: "after:2024-01-01" or "before:2024-06-01" page: Page number for pagination (starts at 1) order: Sort order for results. Options: - "relevance": Best match (default) - "latest": Most recent first - "views": Most viewed - "likes": Most liked - "activity": Recent activity - "posts": Most replies Returns a SearchResult object with: - posts: List of matching SearchPost objects with excerpts - topics: List of matching SearchTopic objects - users: List of matching SearchUser objects - grouped_search_result: Metadata about result counts Example queries: - "Chase Sapphire Reserve order:latest" - Recent CSR discussions - "AMEX popup in:title" - Topics about AMEX popup in title - "data point category:credit-cards" - Data points in CC category - "@expert_user order:likes" - Most liked posts by a user Pagination: If more results exist, increment page parameter. """ return get_client().search(query, page=page, order=order)
  • Key import statement in server_tools __init__.py that loads the search_forum tool from its module, triggering the @mcp.tool() decorator registration.
    from .search import search_forum
  • Import of search_forum in the main server.py entrypoint from server_tools, ensuring the tool is available and registered in the MCP server.
    search_forum,
  • Explicit inclusion of 'search_forum' in __all__ of server_tools/__init__.py for convenient re-export and usage.
    "search_forum",

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/rhettlong/uscardforum-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server