Skip to main content
Glama
norman-finance

Norman Finance MCP Server

Official

categorize_transaction

Automatically categorize transactions by analyzing amount, description, and type using AI to simplify financial management for Norman Finance users.

Instructions

Detect category for a transaction using AI.

Args:
    transaction_amount: Amount of the transaction
    transaction_description: Description of the transaction
    transaction_type: Type of transaction ("income" or "expense")
    
Returns:
    Suggested category information for the transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transaction_amountYes
transaction_descriptionYes
transaction_typeYes

Implementation Reference

  • The main implementation of the 'categorize_transaction' tool handler, including input schema via Pydantic Field and the logic to call the detect-category API endpoint.
    @mcp.tool()
    async def categorize_transaction(
        ctx: Context,
        transaction_amount: float = Field(description="Amount of the transaction"),
        transaction_description: str = Field(description="Description of the transaction"),
        transaction_type: str = Field(description="Type of transaction (income or expense)")
    ) -> Dict[str, Any]:
        """
        Detect category for a transaction using AI.
        
        Args:
            transaction_amount: Amount of the transaction
            transaction_description: Description of the transaction
            transaction_type: Type of transaction ("income" or "expense")
            
        Returns:
            Suggested category information for the transaction
        """
        api = ctx.request_context.lifespan_context["api"]
        
        detect_url = urljoin(
            config.api_base_url,
            "api/v1/assistant/detect-category/"
        )
        
        request_data = {
            "transaction_amount": transaction_amount,
            "transaction_description": transaction_description,
            "transaction_type": transaction_type
        }
        
        return api._make_request("POST", detect_url, json_data=request_data)
  • Registration block in the MCP server setup where register_transaction_tools(server) is called, which registers the categorize_transaction tool among others.
    register_client_tools(server)
    register_invoice_tools(server)
    register_tax_tools(server)
    register_transaction_tools(server)
    register_document_tools(server)
    register_company_tools(server)
    register_prompts(server)
    register_resources(server)
  • Import of register_transaction_tools function used to register the transaction tools including categorize_transaction.
    from norman_mcp.tools.transactions import register_transaction_tools
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'using AI', which hints at non-deterministic behavior, but doesn't disclose key traits like accuracy, latency, rate limits, or authentication needs. For a tool with no annotations and AI involvement, this is a significant gap in behavioral transparency.

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 appropriately sized and front-loaded: the first sentence states the purpose clearly, followed by structured 'Args' and 'Returns' sections. Each sentence earns its place, with no redundant information. However, the formatting with quotes and line breaks slightly reduces readability, preventing a perfect score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no annotations, no output schema), the description is partially complete. It covers parameter semantics well but lacks usage guidelines and behavioral details. Without an output schema, the 'Returns' section is vague ('Suggested category information'), leaving the agent uncertain about the response format. This is adequate but has clear gaps.

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 description adds substantial meaning beyond the input schema, which has 0% description coverage. It explains that 'transaction_amount' is the 'Amount of the transaction', 'transaction_description' is the 'Description of the transaction', and 'transaction_type' must be 'income' or 'expense'. This clarifies parameter purposes and constraints, compensating well for the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Detect category for a transaction using AI.' This specifies the verb ('detect'), resource ('category'), and method ('using AI'), distinguishing it from sibling tools like 'create_transaction' or 'update_transaction'. However, it doesn't explicitly differentiate from 'search_transactions' or 'link_transaction', which is why it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing an existing transaction or specific data format, nor does it compare to other tools like 'search_transactions' for filtering or 'update_transaction' for modifying categories. This leaves the agent with minimal context for decision-making.

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

Related 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/norman-finance/norman-mcp-server'

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