Skip to main content
Glama

wariwari

Edit a payment

update_payment
Destructive

Use this to change a payment. Send only the fields that change, plus the lockVersion from get_transaction as expectedRevision.

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": {
      "groupToken": "<groupToken>",
      "transactionToken": "<transactionToken>",
      "expectedRevision": "<expectedRevision>"
    },
    "name": "update_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoOmit to keep the payment's date.
currencyNoOmit to keep the payment's currency.
timeOfDayNoTime of day, `HH:MM` (24-hour). Omit to keep the payment's time.
groupTokenYesThe group's token, from `listGroups` or `listSearchResults`.
amountCentsNoPayment amount in minor units.
descriptionNoOmit to keep the current description. Blank resets it to the default "From → To" label for the payment's participants.
expectedRevisionYesThe `lockVersion` the client last saw on the record it is changing. A mismatch is `409 CONFLICT` with the record as the server now has it.
transactionTokenYesThe expense or payment's token, from `listTransactions` or `listSearchResults`.
toParticipantTokenNoThe participant who received the payment.
fromParticipantTokenNoThe participant who paid.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / timeOfDay / $ref
      Removed value: -"#/$defs/TimeOfDay"
    • addedInput schema / properties / timeOfDay / allOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/TimeOfDay"
      +  }
      +]
    • addedInput schema / properties / timeOfDay / description
      Added value: +"Time of day, `HH:MM` (24-hour). Omit to keep the payment's time."
  2. Changed15 schema fields changed
    • changedInput schema / $defs / Token / description
      Previous value: -"Resource token. 24 characters of base58 (`SecureRandom.base58(24)` —\nthe alphabet excludes the visually-confusable `0`, `O`, `I`, `l`).\nTokens are stable across edits. Most public resources receive a\nserver-generated token on creation; group creation may also accept\nclient-supplied participant tokens for offline/import flows.\n"New value: +"Resource token: 24 base58 characters (the alphabet leaves out the\nlook-alikes `0`, `O`, `I` and `l`). A token never changes. The server\ngenerates one when a create sends none; a client may choose its own for a\ntransaction, participant, category or recurring expense, so a write queued\noffline already knows the token it will have.\n"
    • changedInput schema / properties / amountCents / description
      Previous value: -"Payment amount in minor units. Must be positive."New value: +"Payment amount in minor units."
    • changedInput schema / properties / currency / description
      Previous value: -"Defaults to the group currency when omitted."New value: +"Omit to keep the payment's currency."
    • addedInput schema / properties / date / description
      Added value: +"Omit to keep the payment's date."
    • changedInput schema / properties / description / description
      Previous value: -"Blank uses the default \"From → To\" label for the current\n`fromToken` and `toToken`. On update, omitting the key keeps the\ncurrent description.\n"New value: +"Omit to keep the current description. Blank resets it to the default\n\"From → To\" label for the payment's participants.\n"
    • addedInput schema / properties / expectedRevision
      Added value: +{
      +  "description": "The `lockVersion` the client last saw on the record it is changing. A mismatch is `409 CONFLICT` with the record as the server now has it.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / fromParticipantToken
      Added value: +{
      +  "allOf": [
      +    {
      +      "$ref": "#/$defs/Token"
      +    }
      +  ],
      +  "description": "The participant who paid."
      +}
    • removedInput schema / properties / fromToken
      Removed value: -{
      -  "allOf": [
      -    {
      -      "$ref": "#/$defs/Token"
      -    }
      -  ],
      -  "description": "Token of the participant who paid."
      -}
    • addedInput schema / properties / groupToken / description
      Added value: +"The group's token, from `listGroups` or `listSearchResults`."
    • removedInput schema / properties / lockVersion
      Removed value: -{
      -  "description": "Latest lock version from the payment being updated.",
      -  "minimum": 0,
      -  "type": "integer"
      -}
    • removedInput schema / properties / paymentToken
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / toParticipantToken
      Added value: +{
      +  "allOf": [
      +    {
      +      "$ref": "#/$defs/Token"
      +    }
      +  ],
      +  "description": "The participant who received the payment."
      +}
    • removedInput schema / properties / toToken
      Removed value: -{
      -  "allOf": [
      -    {
      -      "$ref": "#/$defs/Token"
      -    }
      -  ],
      -  "description": "Token of the participant who received the payment."
      -}
    • addedInput schema / properties / transactionToken
      Added value: +{
      +  "description": "The expense or payment's token, from `listTransactions` or `listSearchResults`.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "groupToken",
      -  "paymentToken",
      -  "fromToken",
      -  "toToken",
      -  "amountCents",
      -  "lockVersion"
      -]New value: +[
      +  "groupToken",
      +  "transactionToken",
      +  "expectedRevision"
      +]
  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 declare readOnlyHint=false and destructiveHint=true, so the mutation profile is known. The description adds genuinely non-obvious behavior: this is a PATCH-style update where omitted fields are preserved, and it discloses the optimistic-concurrency contract by mapping the record's lockVersion to expectedRevision. It stops short of describing conflict recovery beyond naming the source of the version value.

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, nothing wasted, and the core action plus the partial-update rule are front-loaded before the concurrency requirement. There is no restating of the name or title and 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 10-parameter mutation with full schema documentation and no output schema, the description covers the two things the schema cannot say on its own: omitted fields are preserved and a revision token is mandatory. Minor gaps remain, such as the consequences of a revision mismatch and any permission requirements, which are relevant given destructiveHint=true.

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 100%, so the baseline is 3, but the description adds meaning the schema cannot: the required expectedRevision parameter does not exist under that name anywhere in the client's model and is explicitly tied to the lockVersion field returned by get_transaction. The 'send only fields that change' instruction also gives the optional parameters collective semantics that isolated per-field descriptions do not convey.

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 states a specific verb and resource ("change a payment") that matches the tool name and title, and it clarifies the partial-update model. It does not distinguish this from closely named siblings like update_expense or record_payment, leaving the agent to infer that this operates on payments rather than expenses.

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?

"Use this to change a payment" implies the usage context, and the reference to get_transaction gives a concrete prerequisite step for obtaining the lockVersion. However, there is no explicit when-not guidance (e.g., use record_payment to create, bulk_edit_expenses to change many), so the agent must infer boundaries from names alone.

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