Skip to main content
Glama

Credit the wallet for a debit

wallet_credit_for_debit
Destructive

Staff only. Credits the customer's wallet through the credit-note path for a debit being refunded, up to what is left on it. Without confirm it shows a preview and changes nothing.

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": {
      "debit_transaction_id": "<debit_transaction_id>",
      "reason": "<reason>"
    },
    "name": "wallet_credit_for_debit"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoOptional. Defaults to what is left to refund on that debit.
reasonYesWhy the customer is credited.
confirmNoDo it. Omitted: shows a preview and changes nothing.
consumer_user_idNoAct on this seat (own seat, account owner or admin, or staff). Same checks as the site.
debit_transaction_idYesThe debit being refunded.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, destructive, non-idempotent mutation, and the description adds genuine context on top: it takes a credit-note path, is capped at the remaining refundable amount, and acts as a no-op preview unless confirm is passed. It still does not warn about repeat-call/idempotency risk or describe what the preview returns, which matters for a destructive tool.

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?

Three short sentences, front-loaded with the access restriction, then the operation, then the dry-run default. No filler and nothing buried.

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 five-parameter destructive mutation with no output schema, the description covers access control, the refund cap, and the preview/commit distinction, which are the points an agent most needs. Gaps remain around preview return shape, error cases (over-cap amount, already-refunded debit), and repeat-call safety.

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 amount, confirm, consumer_user_id and debit_transaction_id are already documented. The description only restates the confirm preview behavior and adds the business cap ('up to what is left'), which is modest added meaning over the schema rather than new parameter guidance.

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 names a specific verb and resource (credit the customer's wallet) and qualifies the mechanism (credit-note path) and target (a debit being refunded). That is enough to separate it from wallet-listing and top-up-refund siblings, though it never names those siblings directly.

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?

It sets a real precondition ('Staff only') and an implied trigger (a debit is being refunded, so the customer is owed money back). It does not say when to prefer this over other wallet-mutating options or what to do when the debit is not refundable, so the agent must infer the boundary.

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.