Skip to main content
Glama

finance

Transactions: Recategorize similar transactions

recategorize_similar_transactions
    Apply a category to ALL of the user's transactions that share an exact
    description and type (case-insensitive description match).

    Mirrors the web "recategorize similar" prompt: after fixing one
    transaction's category, sweep every other transaction with the same
    description + type into that category. Useful for cleaning up a
    recurring merchant in one shot.

    Args:
        description: The exact transaction description to match
            (case-insensitive; whole-string, not a substring).
        transaction_type: 'deposit', 'withdrawal', or 'transfer' — only
            transactions of this type are matched.
        category_name: Category to assign (case-insensitive; user-owned or
            system).
        exclude_transaction_id: Optional transaction id to skip (e.g. the
            one the user already categorized).

    Returns:
        ``{"success": True, "updated": N, "category": ..., "category_id":
        ...}`` (``updated`` may be 0 if nothing else matched), or
        ``{"error": "..."}`` on validation failure.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYes
category_nameYes
transaction_typeYes
exclude_transaction_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With annotations providing no safety signals, the description carries the behavioral burden and does so well: it warns that ALL matching transactions are affected, defines case-insensitive exact matching versus substring, and documents the return shape including updated=0 and validation errors. It could add explicit caution about overwriting existing categories, but the sweep language already implies it.

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 organized into purpose, usage context, Args, and Returns with no filler. Each sentence earns its place, and the most decision-relevant fact (ALL matching transactions) is front-loaded.

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?

For a 4-parameter mutation with no output schema, the description is complete: matching semantics, allowed values, optional exclusion, success and error return contracts are all present. Nothing an agent needs to invoke it correctly is missing.

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?

Schema coverage is 0%, and the description compensates fully: description must be whole-string, transaction_type lists the three allowed values, category_name may be user-owned or system and is case-insensitive, and exclude_transaction_id is optional with a concrete example. Every parameter receives semantics beyond the bare schema.

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 opens with a specific action ('Apply a category to ALL transactions') and a precise matching rule (exact description and type, case-insensitive), which clearly distinguishes it from generic categorization tools. It also positions itself as the bulk sweep companion to a single-category fix.

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?

It explains the intended invocation context ('after fixing one transaction's category') and a motivating use case ('cleaning up a recurring merchant in one shot'). It does not explicitly name alternatives or when-not-to-use, but the context is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources