A2A Agent Card validate

FREE with proof-of-work · or $0.002 in USDC · POST /api/a2a-card-validate

Validate an A2A (Agent2Agent protocol) Agent Card: required fields, skill shape, transport names, capability flags - spec v0.3 structural core. Send POST /api/a2a-card-validate with the required field card and pay $0.002 per call over x402 or MPP, or call it free by solving a proof-of-work challenge. It returns a JSON object with valid, errors, warnings and summary.

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

Category: Live public data · Tags: a2a agent2agent agent-card validate interop protocol agents

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
cardobjectyesthe Agent Card JSON (object or JSON string)

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?"]}]}}'

Without payment this returns HTTP 402 Payment Required with the exact price for a2a-card-validate; any x402 v2 or MPP client pays it and retries.

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?"
          ]
        }
      ]
    }
  }
}

On the hosted connector at https://agent402.tools/mcp, catalog.call runs a2a-card-validate free (rate-limited, no wallet). Local install: npx -y agent402-mcp.

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?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(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?"
          ]
        }
      ]
    }
  }),
});

No wallet? Pay with compute

Fetch a challenge, solve the sha256 puzzle (16 leading zero bits, a fraction of a second of CPU), and resend with the X-Pow-Solution header:

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?"]}]}}) });

Related tools

A2A Agent Card fetch

$0.005 · POST /api/a2a-card-fetch

Discover and fetch a site's A2A (Agent2Agent protocol) Agent Card - tries /.well-known/agent-card.json then /.well-known…

JSON Schema validate

FREE w/ compute · or $0.001 · POST /api/json-validate

Validate a JSON document against a JSON Schema (draft-07 subset) and get the list of violations. Supports type, required…

Amortization schedule

FREE w/ compute · or $0.001 · POST /api/amortization

Build the full per-period amortization schedule for a fully-amortizing loan. Each row reports the period number, payment…

Annuity present/future value

FREE w/ compute · or $0.001 · POST /api/annuity

Present and future value of a level annuity (equal periodic payments). Supports an ordinary annuity (payments at period …

Barcode / QR decode

FREE w/ compute · or $0.001 · POST /api/barcode-decode

Decode a barcode or QR code from an image. Send a base64 PNG or JPEG (or a data: URL); returns the decoded text and the …

Barcode product lookup

$0.005 · GET /api/barcode-lookup

Look up a product by its UPC/EAN barcode number via Open Food Facts (open data): name, brand, category, quantity, and nu…