Skip to main content
Glama

Re-check charge on-chain

charges_check
Idempotent

Triggers an immediate on-chain re-check of a charge's payment instead of waiting for the background pass, optionally verifying a specific transaction hash on a given network.

Instructions

Ask the API to re-check a charge's payment on-chain now instead of waiting for the background pass. Optionally pass txHash together with network to verify one specific transaction. Never credits anything that is not really on-chain.

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_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesA Klappay charge id (`ch_` followed by letters and digits).
txHashNoThe on-chain transaction hash to verify directly, if you already have it — e.g. right after a swap-to-pay or wallet-connect transaction is sent. Costs a single RPC call instead of scanning a block range, so the check resolves faster and cheaper. Omit to fall back to scanning recent transfers to this charge's address, the same lookup the background reconciliation pass runs. Never trusted at face value — whatever this transaction actually contains on-chain is what gets credited, regardless of any amount/token implied elsewhere.
networkNoWhich network `txHash` is on — required together with `txHash`, since a transaction hash alone doesn't identify a chain. Must be one of the networks this charge actually accepts payment on, or `422 payment_pair_not_accepted`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: the check can credit the charge, and it will only credit what is genuinely on-chain. It also discloses a cost/latency tradeoff (single RPC call vs block-range scan). This is consistent with readOnlyHint=false and idempotentHint=true; it does not, however, say whether the call blocks or what it returns.

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 sentences, front-loaded with what the tool does and why you would use it over the background pass. Minor redundancy with the schema's txHash/network wording, but no filler.

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 three-parameter, non-destructive, idempotent trigger with no output schema, the definition covers purpose, effect (crediting), and cost tradeoff adequately. The main omission is any hint about the response shape or whether the caller should re-fetch the charge afterward.

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 schema already explains id, txHash, and network in depth. The description reinforces the txHash-with-network pairing and the trust model ('whatever this transaction actually contains on-chain is what gets credited'), but adds little beyond the schema text. Baseline 3 is appropriate.

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?

States a specific verb and resource: force an on-chain re-check of a charge's payment now rather than awaiting the background pass. The contrast with the deferred reconciliation flow makes the intent unambiguous, but no sibling (e.g. charges_get, charges_timeline) is named to sharpen the boundary.

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?

Implies the triggering condition clearly ('now instead of waiting for the background pass') and gives a concrete case for the optional path ('right after a swap-to-pay or wallet-connect transaction is sent'). No explicit when-not-to-use guidance or exclusion against sibling lookup tools.

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