81trust / 100
Openapi Lint
by OpenAPI agent-readiness lint in Documents & files
x402 APIPassing, checked 36 min ago
Score an OpenAPI 3.x or Swagger 2.x spec on agent-readiness - i.e. does an LLM-driven caller have what it needs to call the API correctly without guessing. Returns a 0..100 score, severity counts, and a structured list of violations with stable rule codes. Checks: documented title/servers/paths, per-operation summary/description/operationId/tags, documented 2xx + error responses, param descriptions/schemas/examples, response descriptions, JSON response schemas.
POST https://agent402.tools/api/openapi-lint
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 193 ms typical, 193 ms slowest 5%
- Last check
- 36 min ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/openapi-lint" \
-H "content-type: application/json" \
-d '{"spec":{"info":{"description":"An example API","title":"Demo","version":"1.0.0"},"openapi":"3.0.0","paths":{"/users":{"get":{"parameters":[{"description":"Max results","in":"query","name":"limit","schema":{"example":10,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array"}}},"description":"ok"},"400":{"description":"bad input"}},"summary":"List users","tags":["users"]}}},"servers":[{"url":"https://api.example.com"}]}}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fopenapi-lint
const res = await pay("https://agent402.tools/api/openapi-lint", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"spec":{"info":{"description":"An example API","title":"Demo","version":"1.0.0"},"openapi":"3.0.0","paths":{"/users":{"get":{"parameters":[{"description":"Max results","in":"query","name":"limit","schema":{"example":10,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array"}}},"description":"ok"},"400":{"description":"bad input"}},"summary":"List users","tags":["users"]}}},"servers":[{"url":"https://api.example.com"}]}}),
});
console.log(await res.json());Example input
{
"spec": {
"info": {
"description": "An example API",
"title": "Demo",
"version": "1.0.0"
},
"openapi": "3.0.0",
"paths": {
"/users": {
"get": {
"parameters": [
{
"description": "Max results",
"in": "query",
"name": "limit",
"schema": {
"example": 10,
"type": "integer"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array"
}
}
},
"description": "ok"
},
"400": {
"description": "bad input"
}
},
"summary": "List users",
"tags": [
"users"
]
}
}
},
"servers": [
{
"url": "https://api.example.com"
}
]
}
}Example output
{
"counts": {
"error": 0,
"info": 0,
"warning": 1
},
"ok": true,
"score": 97,
"violations": [
{
"location": "GET /users",
"message": "Operation has no operationId - agents can't refer to this call by a stable name.",
"rule": "operation-missing-operationid",
"severity": "warning"
}
]
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 36 min ago | Passed | 402 | 193 ms | $0.002 |
| 6 h ago | Passed | 402 | 208 ms | $0.002 |