Diagnose one API endpoint live (paid, $0.50)
api_diagnosePAID over x402 inside this tool call ($0.50 USDC on Base, Polygon or Arc): actually call one API endpoint and return the verdict, failure class, auth diagnostics, response-schema validation, deterministic corrections, and a working example request (curl + JSON). Public endpoints only in v1 — no credentials are accepted. Call once without payment to get the x402 PaymentRequired, then call again with the signed payment in _meta["x402/payment"].
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": {
"url": "<url>"
},
"name": "api_diagnose"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Target endpoint URL, e.g. 'https://api.example.com/v1/users'. | |
| body | No | Request body for POST/PUT/PATCH. | |
| spec | No | Optional inline OpenAPI spec JSON to check against. | |
| query | No | Query parameters. | |
| method | No | HTTP method, default GET. | |
| docsUrl | No | Optional OpenAPI spec or docs URL to check against. | |
| headers | No | Request headers (no credentials in v1). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Endpoint diagnosed | |
| auth | No | Auth diagnostics: required, status, www-authenticate, scheme, declared security | |
| spec | No | Spec check: valid, version, errors | |
| _paid | No | x402 receipt | |
| error | No | Fetch error, or null | |
| method | No | HTTP method | |
| schema | No | Response-schema validation: valid, issues | |
| status | No | HTTP status, or null if unreachable | |
| verdict | No | working | working_but_slow | broken | |
| latencyMs | No | Probe latency in ms | |
| contentType | No | Response content-type | |
| corrections | No | Deterministic corrections, in order | |
| failureClass | No | working | auth | not_found | wrong_method | bad_request | server_error | timeout | schema_mismatch | ... | |
| exampleRequest | No | Working example request: curl + JSON request | |
| responseExcerpt | No | Response body excerpt |