Skip to main content
Glama
raidenrock

USCardForum MCP Server

by raidenrock

get_categories

Retrieve a complete mapping of forum categories to organize topics by subject area, enabling filtering and navigation within the USCardForum community.

Instructions

Get a mapping of all forum categories.

Returns a CategoryMap object with category_id to category name mapping.
Categories organize topics by subject area.

Common USCardForum categories include sections for:
- Credit card applications and approvals
- Bank account bonuses
- Travel and redemptions
- Data points and experiences

Use category IDs to:
- Filter search results by category
- Understand which section a topic belongs to
- Navigate to specific areas of interest

The mapping includes both main categories and subcategories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoriesNoID to name mapping

Implementation Reference

  • The MCP tool handler function for 'get_categories'. Decorated with @mcp.tool(), it retrieves the category mapping using get_client().get_category_map() and returns a CategoryMap.
    @mcp.tool()
    def get_categories() -> CategoryMap:
        """
        Get a mapping of all forum categories.
    
        Returns a CategoryMap object with category_id to category name mapping.
        Categories organize topics by subject area.
    
        Common USCardForum categories include sections for:
        - Credit card applications and approvals
        - Bank account bonuses
        - Travel and redemptions
        - Data points and experiences
    
        Use category IDs to:
        - Filter search results by category
        - Understand which section a topic belongs to
        - Navigate to specific areas of interest
    
        The mapping includes both main categories and subcategories.
        """
        return get_client().get_category_map()
  • Pydantic BaseModel defining the CategoryMap return type for the get_categories tool, providing a dictionary mapping category IDs to names with utility methods.
    class CategoryMap(BaseModel):
        """Mapping of category IDs to names."""
    
        categories: dict[int, str] = Field(
            default_factory=dict, description="ID to name mapping"
        )
    
        def get_name(self, category_id: int) -> str | None:
            """Get category name by ID."""
            return self.categories.get(category_id)
    
        def __getitem__(self, category_id: int) -> str:
            """Get category name by ID."""
            return self.categories[category_id]
    
        def __contains__(self, category_id: int) -> bool:
            """Check if category ID exists."""
            return category_id in self.categories
    
        def items(self) -> list[tuple[int, str]]:
            """Iterate over category mappings."""
            return list(self.categories.items())
  • Import statement registering the get_categories tool in the server_tools package __init__, making it available for import in the MCP server.
    from .categories import get_categories
  • Explicit inclusion of get_categories in the __all__ export list of the main server entrypoint, ensuring it's registered and exposed as an MCP tool.
    "get_categories",
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 and does well by disclosing key behaviors: it returns a CategoryMap object, includes both main and subcategories, and lists common category examples. It does not cover potential limitations like rate limits or auth needs, but provides useful context beyond basic functionality.

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, starting with the core purpose and return value, followed by examples and usage scenarios. Every sentence adds value, such as explaining category organization and practical applications, with no wasted words or redundancy.

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 low complexity (0 parameters), high schema coverage (100%), and presence of an output schema (true), the description is complete. It explains what the tool does, what it returns, and how to use the output, covering all necessary context without needing to detail parameters or return values explicitly.

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?

There are 0 parameters, and schema description coverage is 100%, so the baseline is 4. The description appropriately does not discuss parameters, focusing instead on output and usage, which adds value without redundancy.

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 verb 'Get' and resource 'mapping of all forum categories', specifying it returns a CategoryMap object. It distinguishes from siblings by focusing on category mapping rather than topics, posts, users, or other forum entities, making the purpose specific 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use this tool, such as for filtering search results, understanding topic sections, and navigation. However, it does not explicitly state when not to use it or name alternatives among sibling tools, leaving some guidance implicit rather than explicit.

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