Skip to main content
Glama
hmumixaM

USCardForum MCP Server

by hmumixaM

get_categories

Retrieve a complete mapping of forum categories to filter content, navigate sections, and organize topics by subject area in 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()-decorated handler function that implements the get_categories tool logic, fetching and returning the 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 output type CategoryMap returned by the get_categories tool.
    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):
            """Iterate over category mappings."""
            return self.categories.items()
  • Import statement that brings the get_categories tool into the server_tools package namespace for registration.
    from .categories import get_categories
  • Explicit import of get_categories in the main server.py file, ensuring the decorated tool is registered with the MCP server.
    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 of behavioral disclosure. It effectively describes the tool's behavior by specifying the return type (CategoryMap object), the scope (all categories including main and subcategories), and practical applications. It does not mention potential limitations like rate limits or authentication needs, but covers core functionality adequately.

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 explanatory context and use cases. Every sentence adds value without redundancy, and it efficiently conveys necessary information in a compact format.

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, no annotations, but with an output schema), the description is complete. It explains what the tool does, what it returns, and how to use the output, compensating for the lack of annotations. The presence of an output schema means the description does not need to detail return values, and it adequately covers all relevant aspects.

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 input schema has 0 parameters with 100% coverage, so the baseline is 4. The description adds no parameter-specific information, which is appropriate since no parameters exist, and instead focuses on output semantics and usage context.

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 verb ('Get') and resource ('mapping of all forum categories'), distinguishing it from sibling tools like get_topic_info or get_user_summary that focus on different resources. It explicitly defines what the tool returns (CategoryMap object) and its purpose (organizing topics by subject area).

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 for when to use this tool by listing specific use cases (filter search results, understand topic sections, navigate to areas of interest). However, it does not explicitly state when NOT to use it or name alternatives among sibling tools, such as using get_topic_info for topic-specific details instead.

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