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

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

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

A4.5/5.0
Behavior5/5

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

Discloses the key side effect (a live 402 observation is upserted into the service catalog, explicitly 'not read-only'), which is exactly the kind of context annotations cannot convey. It also spells out hard-stops (wash_flagged, price_kind=exact) and warns that 'unknown' is not a trust verdict, adding genuine behavioral depth.

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?

Front-loads purpose well and uses a scannable decision table, but several lines are verbatim repeats ('wash_flagged=true never soft-allows' and the 'Unlabeled leftover 0.05 / leftover=0' caveat each appear twice). The redundancy costs space without adding information.

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?

An output schema exists, so return values need not be described, and the prose still covers the side effect, decision semantics, hard-stops, and the follow-up revenue path. Nothing an agent needs to invoke and interpret this tool 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 coverage is 100%, so the baseline is 3; the description nonetheless adds real meaning by explaining that price_usdc overrides a 402 exact quote and that unlabeled leftover 0.05 / leftover=0 is not a unit price. Method and agent_intent get no extra color in the prose, keeping it short of a 5.

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+resource ('One-shot x402 guard') and then unpacks the exact pipeline: fetch resource_url, extract seller wallet from the 402 accepts array, run TWZRD preflight, return a spending decision. This is far more specific than any sibling and lets an agent place it precisely among low_level_preflight and the verify_* tools.

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?

It gives strong context on how to act on each decision value (allow/warn/block/unknown) and the revenue path for 'warn'. It does not explicitly contrast itself against siblings like low_level_preflight or verify_x402_settled_claim, so the when-not-to-use-this angle is left to inference.

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.