Skip to main content
Glama

TWZRD Agent Intelligence

evaluate_x402_resource

Destructive
One-shot x402 guard. Fetches resource_url, extracts the seller wallet from the 402 accepts
array (prefers Solana network entries), runs TWZRD preflight, and returns a spending decision.
Side effect: a live 402 observation (resource_url, payTo, price) is upserted into the
service catalog when the catalog database is configured; this tool is not read-only.
wash_flagged=true never soft-allows. Unlabeled leftover 0.05 / leftover=0 is not a unit price.

Decision:
  "allow"   -> proceed only under agent policy. Never when wash_flagged=true.
  "warn"    -> proceed with caution up to the cap; first paid hop is teaser_url ($0.001 /quick). Optional V7 receipt_url is $0.05.
  "block"   -> DO NOT PAY. Stop immediately.
  "unknown" -> is_x402 == False: no 402 challenge was issued at all, so nothing was
               evaluated -- this is NOT a trust verdict. A seller can trivially make
               this happen by returning a non-402 status to this probe while charging
               through a different path for a real caller. Never treat "unknown" as
               a green light; if the caller actually intends to pay this resource_url,
               that separate payment path needs its own evaluation.

Hard-stops:
  wash_flagged=true never soft-allows (decision=block).
  price_usdc is a unit price only when price_kind=exact. Unlabeled leftover 0.05 /
  leftover=0 and scheme=upto leftover defaults are not a per-request price.

Revenue path: when decision is "warn", fetch teaser_url first ($0.001 USDC to TWZRD,
GET /v1/intel/quick/{seller}). Optional receipt_url is the $0.05 V7 signed credential.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoHTTP method to use when probing the resource. Default: GET.GET
price_usdcNoCaller-supplied exact unit price in USDC — overrides a 402 exact quote. Leave unset to use the 402-reported amount when price_kind=exact. Unlabeled leftover 0.05 / leftover=0 is not a unit price.
agent_intentNoNatural-language description of what the agent intends to purchase.
resource_urlYesURL of the x402 resource to evaluate before paying. Will be fetched to extract 402 payment requirements.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoThe evaluated resource URL.
errorNoError or info message; present on non-402 and degraded paths.
is_x402NoTrue if the resource returned HTTP 402 with x402 payment requirements.
decisionNoSpend decision: "allow" | "warn" | "block" | "unknown". wash_flagged=true never soft-allows — this field is block. "unknown" means is_x402 is False -- no 402 challenge was issued, so no trust evaluation happened. Never treat "unknown" as a green light.
price_kindNoexact | upto_cap | unknown. upto_cap means price_usdc is not a unit price.
price_usdcNoQuoted unit price in USDC from the 402 response. Null when the accept is scheme=upto / price_kind=upto_cap, or the figure is unlabeled leftover 0.05 / leftover=0 (not a unit price).
teaser_urlNoFirst paid hop: $0.001 score-only teaser URL.
receipt_urlNoOptional $0.05 V7 portable receipt URL.
trust_scoreNoComposite trust signal, 0-100.
upsell_usdcNoCost of the first paid hop in USDC (0.001 teaser).
receipt_usdcNoCost of the optional V7 receipt in USDC (0.05).
seller_walletNoSeller wallet extracted from the 402 accepts array (Solana preferred).
max_price_usdcNoAdvertised maximum USDC when price_kind is upto_cap.
readiness_cardNoFull readiness card from the preflight evaluation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedOutput schema / properties / receipt_url / description
      Previous value: -"URL to fetch the paid trust receipt ($0.05 USDC to TWZRD)."New value: +"Optional $0.05 V7 portable receipt URL."
    • addedOutput schema / properties / receipt_usdc
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Cost of the optional V7 receipt in USDC (0.05).",
      +  "title": "Receipt Usdc"
      +}
    • addedOutput schema / properties / teaser_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "First paid hop: $0.001 score-only teaser URL.",
      +  "title": "Teaser Url"
      +}
    • changedOutput schema / properties / upsell_usdc / description
      Previous value: -"Cost of the TWZRD paid trust receipt in USDC."New value: +"Cost of the first paid hop in USDC (0.001 teaser)."
  2. Changed3 schema fields changed
    • changedInput schema / properties / price_usdc / description
      Previous value: -"Known price in USDC — overrides what the 402 reports. Leave unset to use the 402-reported amount."New value: +"Caller-supplied exact unit price in USDC — overrides a 402 exact quote. Leave unset to use the 402-reported amount when price_kind=exact. Unlabeled leftover 0.05 / leftover=0 is not a unit price."
    • changedOutput schema / properties / decision / description
      Previous value: -"Spend decision: \"allow\" | \"warn\" | \"block\" | \"unknown\". \"unknown\" means is_x402 is False -- no 402 challenge was issued, so no trust evaluation happened. Never treat \"unknown\" as a green light."New value: +"Spend decision: \"allow\" | \"warn\" | \"block\" | \"unknown\". wash_flagged=true never soft-allows — this field is block. \"unknown\" means is_x402 is False -- no 402 challenge was issued, so no trust evaluation happened. Never treat \"unknown\" as a green light."
    • changedOutput schema / properties / price_usdc / description
      Previous value: -"Quoted unit price in USDC from the 402 response. Null when the accept is scheme=upto (a cap, not a per-request price)."New value: +"Quoted unit price in USDC from the 402 response. Null when the accept is scheme=upto / price_kind=upto_cap, or the figure is unlabeled leftover 0.05 / leftover=0 (not a unit price)."
  3. Changed3 schema fields changed
    • addedOutput schema / properties / max_price_usdc
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Advertised maximum USDC when price_kind is upto_cap.",
      +  "title": "Max Price Usdc"
      +}
    • addedOutput schema / properties / price_kind
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "exact | upto_cap | unknown. upto_cap means price_usdc is not a unit price.",
      +  "title": "Price Kind"
      +}
    • changedOutput schema / properties / price_usdc / description
      Previous value: -"Quoted price in USDC from the 402 response."New value: +"Quoted unit price in USDC from the 402 response. Null when the accept is scheme=upto (a cap, not a per-request price)."
  4. Changed1 schema field changed
    • changedOutput schema / properties / decision / description
      Previous value: -"Spend decision: \"allow\" | \"warn\" | \"block\"."New value: +"Spend decision: \"allow\" | \"warn\" | \"block\" | \"unknown\". \"unknown\" means is_x402 is False -- no 402 challenge was issued, so no trust evaluation happened. Never treat \"unknown\" as a green light."
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.