Skip to main content
Glama

Get everything needed to actually pay for a packet

prepare_funding
Read-onlyIdempotent

Step 2 for a buyer: returns the live payment requirements for funding a packet — the onchain door's own x402 challenge (accepts[], exact amount, asset, chain, pay-to address) read from that door at this moment, and, when a card rail is mounted on this host, its hosted checkout URL. To chip in a slice instead of the whole remaining amount, pass the typed contributeUsd input and it is forwarded to the real door verbatim; omit it to pay everything the packet still needs (the canonical remaining amount, never a stale posted wage, and never an implicit premium). The door remains the authority on floors, ceilings and the exact challenge — this tool never calculates a charge itself. The exact amount is the wage still owed plus the Vealth service fee (10%), shown apart, while a door is open; while paying Vealth is closed the doors refuse and you pay the worker directly. You pay from YOUR own wallet or card; this server holds no funds and no keys, takes no payment, and marks nothing funded. A packet becomes funded only when a payment actually settles and is verified. Not ready to pay, or want to signal backing without money moving yet? prepare_backing is the FREE sibling door — a signed pledge, no payment required. Cost and signer: free to read; no payment is taken here while paying Vealth is closed, and when a door is open the buyer's own wallet or card pays and signs, and the house never holds a key.

Input Schema

NameRequiredDescriptionDefault
workIdYesThe packet id, from find_work.
funderWalletNoThe 0x… address that will pay onchain. Needed for the onchain door's live challenge; the card path does not use it.
contributeUsdNoOptional EXPLICIT contribution in USD. Omit to fund the canonical remaining amount. Forwarded to the live door verbatim; the door enforces its own floor, ceiling and remaining-amount truth. An explicit amount above the remaining is a deliberate worker premium.

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. Changed1 schema field changed
    • addedInput schema / properties / contributeUsd
      Added value: +{
      +  "description": "Optional EXPLICIT contribution in USD. Omit to fund the canonical remaining amount. Forwarded to the live door verbatim; the door enforces its own floor, ceiling and remaining-amount truth. An explicit amount above the remaining is a deliberate worker premium.",
      +  "type": "number"
      +}
  2. Changed2 schema fields changed
    • addedOutput schema / properties / claimable
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / notClaimableReason
      Added value: +{
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "claimId": {
      +      "type": "string"
      +    },
      +    "definitionOfDone": {
      +      "type": [
      +        "object",
      +        "array",
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "fulfillableBy": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "funded": {
      +      "type": "boolean"
      +    },
      +    "needs_from_caller": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "next_call": {
      +      "type": "object"
      +    },
      +    "ok": {
      +      "type": "boolean"
      +    },
      +    "payUsd": {
      +      "type": "number"
      +    },
      +    "proofRule": {
      +      "type": "string"
      +    },
      +    "tool": {
      +      "type": "string"
      +    },
      +    "workId": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  4. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond readOnlyHint/idempotent, it discloses that the server holds no funds or keys, takes no payment, marks nothing funded, and that funding only occurs when a payment actually settles and is verified. It also states the door — not this tool — is the authority on floors, ceilings, and the exact charge, which is exactly the behavioral context an agent needs.

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 key facts are front-loaded in the first sentence, but the description is long and repeats itself — the 'no funds, no keys, no payment' point appears twice ('this server holds no funds and no keys… marks nothing funded' and later 'the house never holds a key'), and the closed-door caveat is restated in the closing cost/signer sentence.

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 3-parameter, read-only preparation tool with an output schema, this covers everything an agent needs: what is returned, who signs and pays, what this tool does not do, the fallback state when the payment rail is closed, and the free alternative.

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 coverage is 100%, so baseline is 3; the description adds real meaning by explaining that contributeUsd is forwarded verbatim to the door, that omitting it funds the canonical remaining amount (never a stale wage and never an implicit premium), and that an over-remaining amount is a deliberate premium. funderWallet's role (onchain door only, unused by the card path) is stated in the schema rather than repeated here.

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?

States a precise verb+resource: returns the live payment requirements (x402 challenge with accepts[], amount, asset, chain, pay-to, plus hosted checkout URL) for funding a packet. It is immediately distinguishable from nearby siblings like funding_quote, payment_options, and prepare_backing.

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?

Explicitly frames the call as 'Step 2 for a buyer' and names the alternative: 'Not ready to pay, or want to signal backing without money moving yet? prepare_backing is the FREE sibling door.' It also gives the when-not condition ('while paying Vealth is closed the doors refuse and you pay the worker directly').

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