validate_extension
Structurally validate x402 extension payloads by checking the { info, schema } envelope and known-extension fields, with optional spec pointers when full JSON-schema validation is needed.
Instructions
Structurally validate an x402 extension payload: checks the typed { info, schema } envelope and runs light known-extension field checks (offer-and-receipt, payment_identifier, gas-sponsoring, sign-in-with-x, builder_code). Pass payload as a single entry (with name), an extensions map keyed by name, or an array. Full JSON-schema validation needs the extension’s published schema; this is the structural gate plus a spec pointer. No network.
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": {
"payload": "<payload>"
},
"name": "validate_extension"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional extension name when `payload` is a single entry. | |
| payload | Yes | An extension entry, an extensions map, or an array of entries. |