Skip to main content
Glama
Beankeeper

Beankeeper

Official

rule_amend

Replace an active categorization rule by ID with fully specified replacement terms, preserving both versions in the audit trail and returning a new rule ID.

Instructions

Supersede an active categorization rule by ID with fully specified replacement terms. Returns a new rule ID and retains both versions in the audit trail.

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": {
      "company": "<company>",
      "id": "<id>",
      "account": "<account>"
    },
    "name": "rule_amend"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
accountYesAccount that receives each categorized line.
companyYes
containsNoCondition: case-insensitive literal substring of the description.
currencyNoCurrency of the amount condition. Defaults to the book's currency.
priorityNoThe precedence of a rule. Higher values take precedence.
amount_eqNoCondition: exact line amount in major units.
amount_gtNoCondition: line amount greater than this, in major units.
amount_ltNoCondition: line amount less than this, in major units.
directionNoCondition: inflow when money arrived in the bank account, outflow when it left.
set_projectNoAction: attribute each categorized line to this project.
counterpartyNoCondition: the line is from or to this counterparty. A linked counterparty decides; otherwise the party's name must appear in the description.
set_counterpartyNoAction: link each categorized transaction to this counterparty.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv1.2.0
    • addedInput schema / properties / account / description
      Added value: +"Account that receives each categorized line."
    • addedInput schema / properties / amount_eq
      Added value: +{
      +  "description": "Condition: exact line amount in major units.",
      +  "pattern": "^[+-]?[0-9]+(\\.[0-9]*)?$",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / amount_gt
      Added value: +{
      +  "description": "Condition: line amount greater than this, in major units.",
      +  "pattern": "^[+-]?[0-9]+(\\.[0-9]*)?$",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / amount_lt
      Added value: +{
      +  "description": "Condition: line amount less than this, in major units.",
      +  "pattern": "^[+-]?[0-9]+(\\.[0-9]*)?$",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / contains / description
      Added value: +"Condition: case-insensitive literal substring of the description."
    • changedInput schema / properties / contains / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedInput schema / properties / counterparty
      Added value: +{
      +  "description": "Condition: the line is from or to this counterparty. A linked counterparty\ndecides; otherwise the party's name must appear in the description.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / currency
      Added value: +{
      +  "default": null,
      +  "description": "Currency of the amount condition. Defaults to the book's currency.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / direction
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "Which way money moved through the bank or card account.",
      +      "oneOf": [
      +        {
      +          "const": "inflow",
      +          "description": "Money arrived: the bank line is a debit and the categorized line a credit.",
      +          "type": "string"
      +        },
      +        {
      +          "const": "outflow",
      +          "description": "Money left: the bank line is a credit and the categorized line a debit.",
      +          "type": "string"
      +        }
      +      ]
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Condition: inflow when money arrived in the bank account, outflow when it left."
      +}
    • addedInput schema / properties / set_counterparty
      Added value: +{
      +  "description": "Action: link each categorized transaction to this counterparty.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / set_project
      Added value: +{
      +  "description": "Action: attribute each categorized line to this project.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedInput schema / required
      Previous value: -[
      -  "company",
      -  "id",
      -  "contains",
      -  "account"
      -]New value: +[
      +  "company",
      +  "id",
      +  "account"
      +]
  2. First observedv1.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, so the description adds genuinely useful behavior: the operation returns a NEW rule ID rather than mutating in place, and both versions persist in the audit trail. That tells the agent the old ID becomes stale and the change is non-destructive/auditable, which is exactly the context annotations lack.

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 sentences, zero filler, with the operation and its identifier-first framing front-loaded before the return/audit behavior. Nothing is repeated from the structured fields.

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 13-parameter mutation with no output schema, the description covers the essential gaps: replacement-not-patch semantics and the return value (a new rule ID). Remaining omissions, such as failure modes for inactive or unknown rule IDs and any permission prerequisites, are minor.

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 85%, so per-parameter meaning is largely handled by the schema. The description contributes a non-obvious semantic, however: replacement terms must be 'fully specified', implying omitted conditions/actions are cleared rather than left untouched, which materially changes how the agent must populate the 13 fields.

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 uses a specific verb ('supersede') plus resource ('active categorization rule') and scoping ('by ID'), which clearly distinguishes it from plain creation or deletion. It stops short of naming rule_create or rule_delete explicitly, so the agent must infer the boundary from the verb alone.

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?

Usage is implied by 'active categorization rule' and 'replacement terms', suggesting this is for an existing rule that needs new conditions rather than a brand-new rule. It never states when to prefer this over rule_create or rule_delete, nor what happens if the target rule is inactive or missing.

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

Deploy Server

Other Tools