Skip to main content
Glama
ledgerlens

ledgerlens

by vovaddk

set_category

Correct transaction categories by setting a category for one transaction or applying merchant-level updates to past and future imports.

Instructions

Correct a category. Merchant-level corrections apply to past and future imports.

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": {
      "category": "<category>"
    },
    "name": "set_category"
  }
}

Input Schema

NameRequiredDescriptionDefault
categoryYesOne of: groceries, restaurants, transport, fuel, utilities, telecom, subscriptions, health, shopping, electronics, entertainment, travel, education, rent, cash_withdrawal, transfers, fees, salary, other_income, uncategorized.
merchantNoMerchant/description text; the correction applies to all its rows.
transaction_idNoCorrect one transaction only (id from a query).

Output Schema

NameRequiredDescriptionDefault
noteYes
scopeYes
targetYes
categoryYes
rows_updatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-destructive, closed-world mutation, and the description adds a real behavioral fact beyond them: merchant-level corrections are retroactive and forward-looking across imports. It stops short of saying what is overwritten, whether a prior category is recoverable, or what happens when merchant and transaction_id are supplied together.

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?

Two short sentences with no filler, and the most consequential fact (retroactive merchant-level scope) is placed where it will be read rather than buried.

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?

An output schema exists so return values need not be described, and all parameters are documented. The remaining gap is the interaction between the two optional targeting parameters and the behavior when neither is supplied.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already defines all three parameters including the category enum and merchant row-scope. The description adds temporal scope ("past and future imports") but leaves the precedence between merchant and transaction_id unexplained, so it only marginally exceeds the schema baseline.

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?

"Correct a category" states a specific verb and resource, and the second sentence scopes the operation. It does not explicitly contrast with the sibling categorize_transactions, so an agent must infer which of the two is the correction path versus the bulk path.

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

Usage Guidelines3/5

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

The definition implies usage (fixing a mis-categorized item) and explains the merchant-level scope, but never states when to prefer this over categorize_transactions or when to use merchant versus transaction_id. Guidance is implied rather than stated.

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