Skip to content

A2A Agent Card validate

FREE with proof-of-workor $0.002 in USDCPOST /api/a2a-card-validate

Validate an A2A (Agent2Agent protocol) Agent Card: required fields, skill shape, transport names, capability flags - spec v0.3 structural core.

Category: Live public dataTags: a2a agent2agent agent-card validate interop protocol agents

Try in playground →

Details

Returns errors, interop warnings, and a normalized summary (skills, interfaces, capabilities). Deterministic mini-A2A tooling - check a card before your agent trusts it.

Parameters

NameTypeRequiredDescription
cardobjectyesthe Agent Card JSON (object or JSON string)

Free call, no wallet

Fetch a challenge, solve its sha256 puzzle (16 leading zero bits), resend with X-Pow-Solution.

import { createHash } from "node:crypto";
const lz = (b) => { let t = 0; for (const x of b) { if (!x) { t += 8; continue; } t += Math.clz32(x) - 24; break; } return t; };
const c = await (await fetch("https://agent402.tools/api/pow/challenge?slug=a2a-card-validate")).json();
let n = 0;
while (lz(createHash("sha256").update(c.challenge + ":" + n).digest()) < c.difficulty) n++;
await fetch("https://agent402.tools/api/a2a-card-validate", { method: "POST", headers: { "X-Pow-Solution": c.token + ":" + n, "Content-Type": "application/json" }, body: JSON.stringify({"card":{"protocolVersion":"0.3.0","name":"Sample Weather Agent","description":"A sample A2A Agent Card served as a static example for card tooling. This describes a fictional weather agent, not a live A2A endpoint.","url":"https://example.com/a2a/v1","preferredTransport":"JSONRPC","version":"1.0.0","provider":{"organization":"Example Org","url":"https://example.com"},"capabilities":{"streaming":true,"pushNotifications":false,"stateTransitionHistory":false},"defaultInputModes":["application/json","text/plain"],"defaultOutputModes":["application/json"],"skills":[{"id":"get-forecast","name":"Get weather forecast","description":"Returns a city's 5-day forecast.","tags":["weather","forecast"],"examples":["What is the weather in Paris this week?"]}]}}) });

Python:

import hashlib, json, urllib.request

def zero_bits(digest):
    n = 0
    for b in digest:
        if b:
            return n + 8 - b.bit_length()
        n += 8
    return n

c = json.load(urllib.request.urlopen("https://agent402.tools/api/pow/challenge?slug=a2a-card-validate"))
n = 0
while zero_bits(hashlib.sha256(f"{c['challenge']}:{n}".encode()).digest()) < c["difficulty"]:
    n += 1
req = urllib.request.Request("https://agent402.tools/api/a2a-card-validate", method="POST", data="{\"card\":{\"protocolVersion\":\"0.3.0\",\"name\":\"Sample Weather Agent\",\"description\":\"A sample A2A Agent Card served as a static example for card tooling. This describes a fictional weather agent, not a live A2A endpoint.\",\"url\":\"https://example.com/a2a/v1\",\"preferredTransport\":\"JSONRPC\",\"version\":\"1.0.0\",\"provider\":{\"organization\":\"Example Org\",\"url\":\"https://example.com\"},\"capabilities\":{\"streaming\":true,\"pushNotifications\":false,\"stateTransitionHistory\":false},\"defaultInputModes\":[\"application/json\",\"text/plain\"],\"defaultOutputModes\":[\"application/json\"],\"skills\":[{\"id\":\"get-forecast\",\"name\":\"Get weather forecast\",\"description\":\"Returns a city's 5-day forecast.\",\"tags\":[\"weather\",\"forecast\"],\"examples\":[\"What is the weather in Paris this week?\"]}]}}".encode(), headers={"X-Pow-Solution": f"{c['token']}:{n}", "Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(req)))

Example request

curl -i -X POST https://agent402.tools/api/a2a-card-validate \
  -H "Content-Type: application/json" \
  -d '{"card":{"protocolVersion":"0.3.0","name":"Sample Weather Agent","description":"A sample A2A Agent Card served as a static example for card tooling. This describes a fictional weather agent, not a live A2A endpoint.","url":"https://example.com/a2a/v1","preferredTransport":"JSONRPC","version":"1.0.0","provider":{"organization":"Example Org","url":"https://example.com"},"capabilities":{"streaming":true,"pushNotifications":false,"stateTransitionHistory":false},"defaultInputModes":["application/json","text/plain"],"defaultOutputModes":["application/json"],"skills":[{"id":"get-forecast","name":"Get weather forecast","description":"Returns a city'\''s 5-day forecast.","tags":["weather","forecast"],"examples":["What is the weather in Paris this week?"]}]}}'

Watch a call get paid

RequestPOST /api/a2a-card-validate
402$0.002 USDC
SignPAYMENT-SIGNATURE
Settleon 14 chains
Answer200 OK
ReceiptAgent402-ReceiptEd25519

Example response

{
  "valid": true,
  "errors": [],
  "warnings": [],
  "summary": {
    "name": "Sample Weather Agent",
    "skillCount": 1
  }
}
FieldTypeAlways presentIn the example
validbooleanyestrue
errorsarrayyes0 items in the example
warningsarrayyes0 items in the example
summaryobjectyes2 fields: name, skillCount

From an MCP client

catalog.call {
  "slug": "a2a-card-validate",
  "params": {
    "card": {
      "protocolVersion": "0.3.0",
      "name": "Sample Weather Agent",
      "description": "A sample A2A Agent Card served as a static example for card tooling. This describes a fictional weather agent, not a live A2A endpoint.",
      "url": "https://example.com/a2a/v1",
      "preferredTransport": "JSONRPC",
      "version": "1.0.0",
      "provider": {
        "organization": "Example Org",
        "url": "https://example.com"
      },
      "capabilities": {
        "streaming": true,
        "pushNotifications": false,
        "stateTransitionHistory": false
      },
      "defaultInputModes": [
        "application/json",
        "text/plain"
      ],
      "defaultOutputModes": [
        "application/json"
      ],
      "skills": [
        {
          "id": "get-forecast",
          "name": "Get weather forecast",
          "description": "Returns a city's 5-day forecast.",
          "tags": [
            "weather",
            "forecast"
          ],
          "examples": [
            "What is the weather in Paris this week?"
          ]
        }
      ]
    }
  }
}

Hosted connector (https://agent402.tools/mcp): free, rate-limited. Stdio package: npx -y agent402-mcp@0.18.0.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.002" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/a2a-card-validate", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "card": {
      "protocolVersion": "0.3.0",
      "name": "Sample Weather Agent",
      "description": "A sample A2A Agent Card served as a static example for card tooling. This describes a fictional weather agent, not a live A2A endpoint.",
      "url": "https://example.com/a2a/v1",
      "preferredTransport": "JSONRPC",
      "version": "1.0.0",
      "provider": {
        "organization": "Example Org",
        "url": "https://example.com"
      },
      "capabilities": {
        "streaming": true,
        "pushNotifications": false,
        "stateTransitionHistory": false
      },
      "defaultInputModes": [
        "application/json",
        "text/plain"
      ],
      "defaultOutputModes": [
        "application/json"
      ],
      "skills": [
        {
          "id": "get-forecast",
          "name": "Get weather forecast",
          "description": "Returns a city's 5-day forecast.",
          "tags": [
            "weather",
            "forecast"
          ],
          "examples": [
            "What is the weather in Paris this week?"
          ]
        }
      ]
    }
  }),
});

Get a wallet or run npx -y agent402-mcp@0.18.0 wallet new.

Related tools