Skip to main content
Glama

Prepare escrow refund

charges_prepare_refund
Read-only

Prepares the exact Safe transaction for an escrow refund: destination, token, amount, chain, nonce, safeTxHash, and EIP-712 typed data to sign; read-only and valid while escrow balance is unchanged.

Instructions

Show the exact Safe transaction an escrow refund of this charge would execute: destination, token, amount in base units, chain id, Safe nonce, safeTxHash and the EIP-712 typedData the escrow releaser must sign. Read-only: it signs and submits nothing, and the refund itself is not available through this server. Valid only while the escrow's balance is unchanged.

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": "charges_prepare_refund"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesA Klappay charge id (`ch_` followed by letters and digits).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, but the description adds substantive behavior beyond them: it signs and submits nothing, the mutation is not available through this server, and the result is only valid while the escrow balance is unchanged. Those are exactly the caveats an agent needs before deciding whether to present the output for external signing.

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: the first front-loads what is returned, the second delivers the read-only and validity caveats. No filler, no restating of the tool name, and the most decision-relevant constraint (no signing/submitting) is placed before the validity caveat.

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?

There is no output schema, and the description compensates by enumerating the returned transaction fields and the EIP-712 typedData the releaser must sign. Combined with the stated preconditions and the read-only guarantee, an agent has everything needed to call it and interpret the result.

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% and the single `id` parameter already documents the `ch_` prefix and pattern, so the schema carries the parameter burden. The phrase "this charge" confirms the id identifies the charge under escrow but adds no format or selection detail beyond the schema. Baseline 3 is appropriate.

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: "Show the exact Safe transaction an escrow refund of this charge would execute," then enumerates the returned fields (destination, token, amount in base units, chain id, Safe nonce, safeTxHash, EIP-712 typedData). The word "refund" plus "escrow releaser must sign" separates it from the sibling charges_prepare_release without needing to open either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the operating context clearly: this only prepares/inspects the transaction and "the refund itself is not available through this server," which tells the agent this is a read/prep step rather than an execution step. It also gives a validity condition ("Valid only while the escrow's balance is unchanged"). It does not explicitly name the alternative tool to use for actually performing the refund, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.