Skip to main content
Glama

pay_kusd

Buy one call from the kUSD market: discover the providers listing capability for kUSD (registry_search currency='kUSD'), rank them (policy: registry | cheapest | reputation), pay the best one from YOUR kUSD wallet — at most max_price_cents — and return its result. The payment is a kUSD box of exactly the quoted cents to the provider, on the x402 wire (PAYMENT-REQUIRED / PAYMENT-SIGNATURE) or k402's kusd-utxo header; each payment also locks 1.5 KAS in the box (yours to recover is the provider's) plus ~0.1 KAS fee, reported in outlay. If the wallet is short it buys the shortfall + 50 cents through the kUSD PSM with your KAS. Fails over to the next provider when one is dead. Every payment stays inside the bounds the wallet's OPERATOR set (per-call ceiling, budgets, rate, top-up cap, allowlists, freeze — see kusd_spend_status); a refusal returns {"error", "code", "spend"} and nothing was paid. Local (stdio) k402-mcp only.

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": {
      "capability": "<capability>",
      "request_body": "<request_body>"
    },
    "name": "pay_kusd"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo
policyNoregistry
capabilityYes
request_bodyYes
max_price_centsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the exact payment wire (x402 PAYMENT-REQUIRED/PAYMENT-SIGNATURE or k402 kusd-utxo header), the 1.5 KAS box lock and ~0.1 KAS fee, automatic PSM top-up of shortfall + 50 cents, provider failover, and the operator-imposed ceilings, budgets, rate, allowlists and freeze. It even specifies the refusal shape ({error, code, spend}) and that nothing is paid on refusal.

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?

Front-loaded with the core flow, then side-effects and cost mechanics, which is the right order. It is dense but almost every clause adds operational information; the only waste is the garbled phrase 'yours to recover is the provider's', which costs a moment of parsing.

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 complex multi-step payment tool with no annotations and no output schema, the description supplies the return value ('return its result'), the cost breakdown via `outlay`, the failure shape, and the local-stdio-only constraint. The remaining gap is what `request_body` and `path` should contain for the downstream provider call.

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 description coverage is 0%, so the description must compensate, and it covers roughly three of five parameters: capability is defined functionally ('providers listing capability'), policy enumerates its values, and max_price_cents is explained as the spend cap. `path` and, more importantly, the free-form nested `request_body` are never explained — an agent gets no guidance on what to put there.

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 specific verb and resource ('Buy one call from the kUSD market') and then enumerates the full pipeline: discover providers by capability, rank by policy, pay the best from your kUSD wallet, return the result. It is clearly distinguishable from registry_search (discovery only) and pay_per_call, since it names the registry lookup as an internal step.

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?

Clear context for when this applies: you want a capability served by a kUSD provider and you want the tool to handle discovery, ranking, payment and failover in one call. It also names the policy alternatives (registry | cheapest | reputation) and points to kusd_spend_status for the spend bounds. It does not explicitly say when to prefer pay_per_call or get_quote instead, so a 4 rather than 5.

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