Skip to main content
Glama

Binyan.im · בניינים

Update payment

update_payment
DestructiveIdempotent

Update an existing payment. paymentId accepts a full UUID or a unique prefix of one in this building; an ambiguous or unknown id fails with an error asking for the full UUID. Only supplied fields change. startDate and endDate cover whole months; when only one is supplied, the existing other bound is reused. Setting status to COMPLETED generates a receipt number when needed. cashBox moves a CASH payment in or out of the building cash box. Setting status to CANCELLED stores an optional cancelReason that appears in the audit log and the apartment ledger; on an already-cancelled payment the reason can be set or changed without resending the status.

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": {
      "buildingId": "<buildingId>",
      "paymentId": "<paymentId>"
    },
    "name": "update_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNo
amountNo
statusNo
cashBoxNoTrue when the money sits in the building cash box. Only meaningful for CASH payments; storing false for any other method keeps it out of the cash box.
dueDateNo
endDateNo
paidDateNo
paymentIdYes
startDateNo
buildingIdYes
descriptionNo
cancelReasonNoWhy the payment was cancelled. Supply it together with status CANCELLED, or later on an already-cancelled payment to set or change the reason without resending the status; it is stored on the payment and shown in the audit log and the apartment ledger.
paymentMethodNo
referenceNumberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / cancelReason / description
      Previous value: -"Why the payment was cancelled. Supply it together with status CANCELLED; it is stored on the payment and shown in the audit log and the apartment ledger."New value: +"Why the payment was cancelled. Supply it together with status CANCELLED, or later on an already-cancelled payment to set or change the reason without resending the status; it is stored on the payment and shown in the audit log and the apartment ledger."
  2. Changed2 schema fields changed
    • addedInput schema / properties / cancelReason
      Added value: +{
      +  "description": "Why the payment was cancelled. Supply it together with status CANCELLED; it is stored on the payment and shown in the audit log and the apartment ledger.",
      +  "maxLength": 500,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / cashBox
      Added value: +{
      +  "description": "True when the money sits in the building cash box. Only meaningful for CASH payments; storing false for any other method keeps it out of the cash box.",
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true; the description goes well beyond them by disclosing partial-update semantics ('Only supplied fields change'), prefix-id resolution and its failure mode, automatic receipt generation on COMPLETED, and the audit/ledger visibility of cancelReason. It still does not warn about what a destructive update can wipe out or mention any permission requirements.

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?

Front-loaded with the core action, then each subsequent sentence attaches to a specific field or state transition. There is no filler, and even the edge case about re-cancelling is compressed into a single clause.

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 14-parameter mutation tool with no output schema, the description covers the highest-risk behaviors: partial updates, id-prefix resolution, date bounds, and status-driven side effects. It is close to complete, with the remaining gap being validation and permission context.

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 description coverage is only 14% across 14 parameters, so the description must carry the load; it adds real meaning for paymentId (UUID prefix, ambiguity error), startDate/endDate (whole months, bound reuse), status (side effects of COMPLETED and CANCELLED), and cashBox. Roughly half the parameters (amount, type, paymentMethod, dueDate, paidDate, referenceNumber, description, buildingId) get no semantic treatment here.

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?

Opens with a specific verb and resource ('Update an existing payment'), and the word 'existing' implicitly separates it from record_payment. It does not name any sibling explicitly, so the differentiation is inferred rather than stated.

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 description gives procedural guidance for tricky cases (prefix ids, reusing an existing date bound, setting cancelReason without resending status), which implies when specific fields are appropriate. It never states when to choose update_payment over record_payment or update_expense, and there are no explicit exclusions.

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