Skip to main content
Glama
norman-finance

Norman Finance MCP Server

Official

search_transactions

Search and filter financial transactions by description, date range, amount, category, status, and cashflow type. Retrieve matching results with sensitive data removed.

Instructions

Search for transactions matching specified criteria.

Args:
    description: Text to search for in transaction descriptions
    from_date: Start date in YYYY-MM-DD format
    to_date: End date in YYYY-MM-DD format
    min_amount: Minimum transaction amount
    max_amount: Maximum transaction amount
    category: Transaction category
    limit: Maximum number of results to return (default 100)
    no_invoice: Whether to exclude invoices
    no_receipt: Whether to exclude receipts
    status: Status of the transaction (UNVERIFIED, VERIFIED)
    cashflow_type: Cashflow type of the transaction (INCOME, EXPENSE)
Returns:
    List of matching transactions with sensitive data removed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cashflow_typeNo
categoryNo
descriptionNo
from_dateNo
limitNo
max_amountNo
min_amountNo
no_invoiceNo
no_receiptNo
statusNo
to_dateNo

Implementation Reference

  • The core handler function for the 'search_transactions' tool. It uses @mcp.tool() decorator for registration, defines input schema with Pydantic Fields, and implements the logic to query the Norman Finance API for matching transactions based on provided filters.
    @mcp.tool()
    async def search_transactions(
        ctx: Context,
        description: Optional[str] = Field(description="Text to search for in transaction descriptions"),
        from_date: Optional[str] = Field(description="Start date in YYYY-MM-DD format"),
        to_date: Optional[str] = Field(description="End date in YYYY-MM-DD format"),
        min_amount: Optional[float] = Field(description="Minimum transaction amount"),
        max_amount: Optional[float] = Field(description="Maximum transaction amount"),
        category: Optional[str] = Field(description="Transaction category"),
        no_invoice: Optional[bool] = Field(description="Whether to exclude invoices"),
        no_receipt: Optional[bool] = Field(description="Whether to exclude receipts"),
        status: Optional[str] = Field(description="Status of the transaction (UNVERIFIED, VERIFIED)"),
        cashflow_type: Optional[str] = Field(description="Cashflow type of the transaction (INCOME, EXPENSE)"),
        limit: Optional[int] = Field(description="Maximum number of results to return (default 100)")
    ) -> Dict[str, Any]:
        """
        Search for transactions matching specified criteria.
        
        Args:
            description: Text to search for in transaction descriptions
            from_date: Start date in YYYY-MM-DD format
            to_date: End date in YYYY-MM-DD format
            min_amount: Minimum transaction amount
            max_amount: Maximum transaction amount
            category: Transaction category
            limit: Maximum number of results to return (default 100)
            no_invoice: Whether to exclude invoices
            no_receipt: Whether to exclude receipts
            status: Status of the transaction (UNVERIFIED, VERIFIED)
            cashflow_type: Cashflow type of the transaction (INCOME, EXPENSE)
            
        Returns:
            List of matching transactions with sensitive data removed
        """
        api = ctx.request_context.lifespan_context["api"]
        company_id = api.company_id
        
        if not company_id:
            return {"error": "No company available. Please authenticate first."}
        
        transactions_url = urljoin(
            config.api_base_url, 
            f"api/v1/companies/{company_id}/accounting/transactions/"
        )
        
        # Build query parameters
        params = {}
        if description:
            params["description"] = description
        if from_date:
            params["dateFrom"] = from_date
        if to_date:
            params["dateTo"] = to_date
        if min_amount:
            params["minAmount"] = min_amount
        if max_amount:
            params["maxAmount"] = max_amount
        if category:
            params["category_name"] = category
        if no_invoice:
            params["noInvoice"] = no_invoice
        if no_receipt:
            params["noAttachment"] = no_receipt
        if status:
            params["status"] = status
        if cashflow_type:
            params["cashflowType"] = cashflow_type
        if limit:
            params["limit"] = limit
        
        return api._make_request("GET", transactions_url, params=params)
  • The registration section in the MCP server setup where register_transaction_tools(server) is called. This invokes the registration of the search_transactions tool (and other transaction tools) with the FastMCP server instance.
    # Register all tools
    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 from transactions.py, necessary for registering the tool.
    from norman_mcp.tools.transactions import register_transaction_tools
Behavior3/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 mentions that results have 'sensitive data removed,' which is valuable behavioral context about data sanitization. However, it doesn't address other important behaviors like pagination (only mentions limit), sorting, error conditions, authentication requirements, or rate limits. For a search tool with 11 parameters, this leaves significant gaps in understanding how the tool behaves.

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 well-structured with clear sections (Args, Returns) and uses bullet-like formatting that makes parameters easy to scan. Every sentence serves a purpose - the opening statement defines the tool, and each parameter explanation is necessary. It could be slightly more concise by combining some parameter explanations, but overall it's efficiently organized.

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 complexity (11 parameters, no annotations, no output schema), the description is partially complete but has significant gaps. It excels at parameter documentation but lacks crucial context about the search behavior, result format beyond 'list of matching transactions,' error handling, and how this tool relates to sibling tools. For a search operation in a financial context, more behavioral transparency would be expected.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides excellent parameter semantics that fully compensate for the 0% schema description coverage. Each of the 11 parameters is clearly documented with meaningful explanations beyond just their names (e.g., 'Text to search for in transaction descriptions,' 'Start date in YYYY-MM-DD format,' 'Whether to exclude invoices'). The description adds substantial value by explaining what each parameter does, their formats, and default values where applicable.

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: 'Search for transactions matching specified criteria.' This is a specific verb ('search') applied to a specific resource ('transactions'), making the function immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_invoices' or 'get_transaction' (though none exist), so it doesn't reach the highest tier of sibling differentiation.

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. There's no mention of prerequisites, when this search is appropriate versus other listing tools, or any context about transaction types. The agent must infer usage from the parameter list alone, which is insufficient for optimal tool selection.

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