Skip to main content
Glama

Reverse a recorded payment

reverse_ledger_payment
Destructive

Undo the most recent payment recorded outside Soundcheck on a ledger line (one recorded with record_ledger_payment or the app's Mark as paid). The line returns to UNPAID or its earlier partially-paid balance; the reversal stays on the audit trail. Only manual payments can be reversed — card/Stripe payments need a refund in the app. Does not move money. Only the org owner, an Admin, a Finance member, or a member with finance access can reverse any line; crew only a payment they recorded on their own payout. Each call reverses one more payment, so it is confirmation-gated. When the organization has QuickBooks Online connected, the change is also sent to QuickBooks.

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": {
      "event_id": "<event_id>",
      "ledger_item_id": "<ledger_item_id>"
    },
    "name": "reverse_ledger_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
event_idYesthe gig the line belongs to, an id from list_events, open_gigs or my_agenda
ledger_item_idYesledger item id from get_event_ledger
organization_idNodefaults to caller's active org; must be the event's org
confirmation_tokenNoleave empty on the first call; the server returns confirmation_required + a token, then resend the SAME args with that token to proceed

Output Schema

NameRequiredDescriptionDefault
okYestrue on success (including confirmation_required prompts)
dataNowhen the tool asks first: { status: "confirmation_required", confirmation_token, summary, expires_in_seconds, instructions } and nothing is changed; once confirmed, the API response { status (HTTP status), data: { crew_invoice, receipts [{ id, filename, content_type, size_bytes, url, uploaded_at, can_delete }], can_upload_receipts, account { external_id, external_provider, id, is_system, name, type }, account_id, amount, assigned_to_user_id, budget_category, can_mark_received, can_undo_received, counterparty_name, counterparty_user_id, created_by, crew_offer_id, currency, date, description, event_id, and 14 more fields } }
errorNowhen ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the destructiveHint/openWorldHint annotations, it discloses the resulting state (returns to UNPAID or the earlier partially-paid balance), that the reversal is retained on the audit trail, that no money moves, and that the change propagates to QuickBooks Online when connected. The confirmation-gated behavior is explained, which the annotations alone do not convey.

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 description is dense but front-loaded: the core action and the state outcome come first, with authorization, confirmation gating, and QuickBooks sync following. It runs five sentences, and the 'Does not move money' fragment is terse yet useful, so nothing is truly wasted, though slight tightening is possible.

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

Completeness5/5

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

For a destructive, open-world mutation with an output schema already present, this covers the elements an agent needs: reversibility outcome, audit trail, permission model, confirmation flow, and external side effects. Return-value explanation is appropriately omitted because an output schema exists.

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 100% and each parameter is already well-documented, including the confirmation_token handshake, so the baseline is 3. The description adds real meaning by explaining that there is no payment selector — successive calls reverse successive payments — which clarifies agent behavior that no single parameter expresses.

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 and resource ('Undo the most recent payment recorded outside Soundcheck on a ledger line') and pins the scope to manual payments recorded via record_ledger_payment or Mark as paid. That distinguishes it immediately from siblings like record_ledger_payment, void_ledger_item, and delete_ledger_item.

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 explicit exclusions ('Only manual payments can be reversed — card/Stripe payments need a refund in the app') and explicit authorization rules (owner, Admin, Finance member, or finance-access member; crew only on their own payout). It also states the crucial operational caveat that each call reverses one more payment, so an agent knows repeated calls walk backwards through history.

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.