Skip to main content
Glama

Record a customer payment

credit_customer
Destructive

Record a customer payment

Records on balanceUsd a payment (positive) or a correction (negative). For your books only: its calls never draw on it and are not blocked at zero, because its usage is debited directly from your balance. Your own balance is untouched. Idempotency-Key is required so a retry never records twice. Returns the customer.

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>",
      "amountUsd": "<amountUsd>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "credit_customer"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe customer id.
noteNoShown in the customer's ledger. Defaults to Credit or Debit.
amountUsdYesNon-zero (at least 0.00000001 either way) and less than 1,000,000 either way. Positive to record a payment; negative to correct. 400 when balanceUsd would leave the range -999,999.99999999 to 999,999.99999999.
idempotencyKeyYesRequired. A unique string for this change (e.g. the payment id): repeating it never applies the change twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (destructiveHint=true, openWorldHint=false), and the description adds genuinely useful behavior the annotations do not convey: the entry is bookkeeping-only, calls never draw on the balance and are not blocked at zero because usage is debited from the caller's balance. It also discloses the return value ('Returns the customer') and the retry guarantee. Minor tension: 'a retry never records twice' sits awkwardly beside idempotentHint=false, though that hint plausibly refers to the tool's intrinsic behavior absent the required key, so this reads as nuance rather than a hard contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening line merely repeats the title, and 'its calls never draw on it and are not blocked at zero' followed by 'Your own balance is untouched' is redundant restatement of the same idea. The important constraint (idempotency key required, returns the customer) is present but pushed to the back rather than front-loaded.

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 destructive mutation with no output schema, the definition supplies the key missing pieces: it says what is mutated (balanceUsd), that the caller's own balance is unaffected, that entries may go negative at the ledger level, and what is returned. Only the optional note parameter and pagination/ledger inspection follow-up are unaddressed.

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

Parameters3/5

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

Schema coverage is 100%, so the baseline is 3; the schema already documents the sign convention, bounds, non-zero rule and the idempotencyKey semantics. The description restates the positive/negative convention and the required key but adds no new meaning (no note on the optional note field or its defaults).

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 gives a specific verb+resource ('Record a customer payment') and immediately clarifies the mechanics: it writes to balanceUsd with a positive amount for a payment and a negative one for a correction. It also draws a clear scope boundary ('for your books only', 'your own balance is untouched'), which separates it from account/balance tools like get_account_budget. It stops short of naming a sibling it is not, so it does not reach a 5.

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 rather than stated: an agent can infer that this is the write path for adjusting a customer's ledger, complementing list_customer_ledger and get_customer. There is no explicit when-to-use or when-not guidance and no named alternative for related scenarios (e.g., top-ups), leaving routing to inference.

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