Skip to main content
Glama

Categorize by merchant

categorize
DestructiveIdempotent

Sort spending into categories by merchant, many merchants in ONE call: each expense of a merchant still in other (scope=all: every expense of it) takes the category, and future bank syncs and imports put that merchant there whenever they bring no category of their own. Use it when spending sits in other (get_summary says sort_other): get_summary category=other group_by=merchant lists the merchants, and each answer here lists the next ones (still_in_other). Pass each name exactly as listed, with an expense category you can tell from it; leave out the ones you cannot. Income and transfers are never touched. Never one call per merchant.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "rules": "<rules>"
    },
    "name": "categorize"
  }
}

Input Schema

NameRequiredDescriptionDefault
rulesYes
scopeNoother (default): only expenses still in other, so earlier choices stay. all: every expense of the merchant.
periodNoOnly for the still_in_other listing: the period the user is looking at, YYYY-MM or YYYY. The rules apply to every expense of the merchant.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and idempotentHint=true; the description adds real substance beyond them: it explains the retroactive effect on existing expenses, that future bank syncs and imports will honor the mapping, the scope=other vs all blast-radius difference, and that income/transfers are never touched. It stops short of stating reversibility or how to undo a mis-categorization, which matters for a destructive write.

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 trigger and batch instruction are front-loaded, and every clause carries operational meaning. It is dense with nested parentheticals, making it slightly harder to parse than it needs to be, but there is no filler.

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

Completeness4/5

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

For a destructive, no-output-schema mutation with 3 parameters, it covers trigger, scope, persistence, and exclusions, and even hints at the response ('each answer here lists the next ones (still_in_other)'). The exact return shape and any per-merchant error reporting are only implied.

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?

Schema coverage is 67%, and the description reinforces the two non-obvious semantics: scope=all applies to every expense of the merchant while the default preserves earlier choices, and period matters only for the still_in_other listing. It also adds caller guidance not in the schema ('Pass each name exactly as listed'), though the category enum meanings are left to the 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 verb+resource+scope: 'Sort spending into categories by merchant, many merchants in ONE call.' It distinguishes itself from per-transaction siblings like log_expense/update_transaction by emphasizing batch merchant-level categorization, and the scope parenthetical clarifies exactly what gets categorized.

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

Usage Guidelines5/5

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

It gives an explicit trigger ('Use it when spending sits in other (get_summary says sort_other)'), names the sibling call that surfaces candidates (get_summary category=other group_by=merchant), and states an exclusion rule ('Never one call per merchant', 'leave out the ones you cannot'). An agent knows both when to call and how to avoid misusing it.

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.