Skip to main content
Glama

TWZRD Agent Intelligence

evaluate_x402_resource

Read-onlyIdempotent
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.
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

A4.1/5.0
Behavior5/5

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

Adds substantial behavioral context beyond the readOnlyHint/idempotentHint annotations: decision semantics, wash_flagged hard-stops, price_kind caveats, and the important warning that 'unknown' is not a trust verdict because a seller can spoof non-402 responses. No contradiction with annotations; the revenue path reads as guidance for the agent, not as the tool itself making payments.

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 definition is front-loaded with a good summary and uses clear sections. However, key caveats are repeated multiple times: wash_flagged appears three times, the leftover/price caveat appears in both the opening and hard-stops, and teaser_url pricing appears twice. This redundancy makes it less concise than ideal.

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?

The description covers decision interpretation, dangerous edge cases, price semantics, hard-stops, and the revenue path for warn outcomes. Since an output schema exists, return-value explanation is not needed. The only undefined notions like 'agent policy' and 'the cap' are external policy concepts rather than missing tool-invocation detail.

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 100%, so the schema already documents all parameters. The description mostly repeats price_usdc and resource_url semantics already present in the schema, and adds nothing new about method or agent_intent. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific behavior: fetches resource_url, extracts the seller wallet from the 402 accepts array, runs TWZRD preflight, and returns a spending decision. It is clear and resource-specific, though it does not explicitly differentiate itself from sibling tools like low_level_preflight or twzrd_demo_gate.

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?

Provides explicit action guidance for each decision value: allow, warn, block, unknown. Hard-stops and revenue-path instructions are also given. However, it does not state when not to use this tool or name alternatives, so some sibling-routing 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.