Skip to main content
Glama

Record a USDC payment you received on Base, checked on the chain (step 1 of 2)

prepare_usdc_settlement
Read-onlyIdempotent

After a person approved your proof and the payer sent you USDC on Base: record that payment on the job. Pass the workId, your worker wallet (the one on the approved proof) and the payment's transaction hash. The board reads the chain itself: it records the settlement only when that transaction is a USDC transfer to your wallet for at least the agreed price, mined after your claim began, and not used for any other job. The result is a public, chain-verified settlement, not your word alone (the direct and token doors record a statement; this one is read from the chain). It moves no money: the payment already happened. It refuses before any signature is asked for when the job has no approved proof for that wallet, is already settled, or the hash already settled a job. Only the worker signs; a payer who wants it recorded gives the worker the transaction hash. Returns MESSAGE_TO_SIGN and BODY_JSON; sign with the worker wallet's personal_sign, then call submit_usdc_settlement within 5 minutes. For a payment made in another way (card, bank, another token) use prepare_direct_settlement or prepare_token_settlement. Cost and signer: free, no gas; the person signs the result with their own wallet or passkey, and the house never holds a key.

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": {
      "workId": "<workId>",
      "workerWallet": "<workerWallet>",
      "paymentTxHash": "<paymentTxHash>"
    },
    "name": "prepare_usdc_settlement"
  }
}

Input Schema

NameRequiredDescriptionDefault
workIdYesThe job you proved, from my_work or work_status.
workerWalletYesThe 0x… address on your approved proof, which will sign. Address only, never a key.
paymentTxHashYesThe 0x… hash (64 hex characters) of the Base transaction that paid you in USDC.

Output Schema

NameRequiredDescriptionDefault
okNo
toolNo
fundedNo
payUsdNo
workIdNo
claimIdNo
claimableNo
next_callNo
proofRuleNo
fulfillableByNo
definitionOfDoneNo
needs_from_callerNo
notClaimableReasonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, and the description is consistent with them: it explicitly says 'It moves no money' and the recording occurs only after the signed payload is submitted via the sibling. Beyond annotations it adds real value: the on-chain validation rules (USDC transfer to that wallet, at least the agreed price, mined after the claim began, not reused for another job), the pre-signature refusal conditions (no approved proof, already settled, hash already used), and the 5-minute signing window. That is substantive behavioral disclosure, though it does not discuss failure modes after signing or what 'already settled' means operationally.

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?

The trigger, required inputs, and chain-verification contract are front-loaded, and the parenthetical about the other doors is placed usefully after the main claim. It is dense but a few clauses stack several ideas at once, especially the final sentence mixing cost, signer identity and key custody.

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?

For a prepare-then-submit tool with three required parameters and an output schema, the description covers the trigger, the inputs, the validation semantics, the refusal conditions, the returned artifacts (MESSAGE_TO_SIGN, BODY_JSON), the signing method and the deadline. Nothing an agent needs to invoke it correctly is missing.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: it frames workId as coming from the approved proof, ties workerWallet to 'the one on the approved proof' that will sign it, and reiterates that paymentTxHash is the payment's transaction hash. The added constraint linking wallet to proof is what pushes this above baseline.

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 title and first sentence state a specific verb and resource: record a received USDC payment on Base against a job. It is explicitly distinguished from the sibling doors ('the direct and token doors record a statement; this one is read from the chain'), so an agent can tell it apart from prepare_direct_settlement and prepare_token_settlement without reading schemas.

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?

The description gives a precise trigger ('After a person approved your proof and the payer sent you USDC on Base'), names the alternatives for other payment rails (card, bank, another token → prepare_direct_settlement / prepare_token_settlement), and spells out the follow-up path (sign MESSAGE_TO_SIGN, then call submit_usdc_settlement within 5 minutes). It also states the separation of roles: only the worker signs; a payer hands over the hash.

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