Skip to main content
Glama

invoice_adjustment_delete

DestructiveIdempotent

[REQUIRES APPROVAL] Retires a dilution fact row — the only correction lane (adjustments are append-only; amounts are never edited). If the retired row was a credit that settled the invoice, the status rolls from 'paid' back to 'sent' and paid_at clears; the remaining balance and the derived 'written_off' state re-derive from the live rows immediately. An agent's call parks here for human approval. NEXT: invoice_adjustment_record to re-record the correct amount.

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": {
      "id": "<id>"
    },
    "name": "invoice_adjustment_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe adjustment id (invoice_adjustment_list shows them).
reasonNo
currencyNo
invoice_idNo
occurred_atNo
reason_codeNo
amount_centsNo
adjustment_idNoAlias of id.
credit_outcomeNo
adjustment_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations declare destructive/idempotent but say nothing about the cascade; the description discloses that retiring a settling credit rolls status from 'paid' back to 'sent', clears paid_at, and re-derives balance and 'written_off'. It also discloses the operational trait the annotations can't express: the call parks for human approval.

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?

Three dense sentences with the approval gate and the correction-lane constraint front-loaded, and no filler. The middle sentence packs a lot of state-transition detail, but every clause describes an actual effect rather than restating the schema.

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

Completeness3/5

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

For a destructive, approval-gated mutation it covers consequences and the follow-up path well, and with no output schema it needn't describe returns. However, with 10 parameters at 20% schema coverage, the definition never addresses whether the nine inherited fields should be supplied on a delete, leaving the invocation shape ambiguous.

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

Parameters2/5

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

Schema description coverage is only 20% (just id and its alias), and the description adds nothing about parameters at all. Worse, it never explains why a delete accepts amount_cents, currency, occurred_at, adjustment_type and credit_outcome — an agent is left guessing whether these are required or ignored, so the description fails to compensate for the coverage gap.

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?

Uses a precise verb ('retires') on a precisely named resource (a dilution fact row / adjustment) and frames it as 'the only correction lane', which immediately separates it from the append-only record path. An agent can distinguish it from invoice_adjustment_record/read/list without opening any schema.

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?

States when to use it (correcting an adjustment, since amounts are never edited) and explicitly routes the follow-up: 'NEXT: invoice_adjustment_record to re-record the correct amount.' The exclusion — corrections are never done by editing — is spelled out rather than inferred.

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