JSON pipeline
Validate, pretty-print, and convert JSON to CSV in one pass - the complete JSON processing workflow.
3 tools run server-side in one request. You pay once, settle once, and get a single response - no orchestration, no per-step payments, and a partial-success envelope if any step fails. USDC over x402 on any supported chain.
When to use this pack
An agent receives raw JSON (from an API response, a webhook body, or user input) and needs to validate it's well-formed, format it for readability, and convert it to CSV for a spreadsheet or data pipeline. Three tools in one payment.
Tools in this pack
All 3 run inside the single $0.050 call above. Each is also callable on its own if you only need one part.
- JSON Schema validate POST /api/json-validate Validate a JSON document against a JSON Schema (draft-07 subset) and get the list of violations. Supports type, required, properties, items, enum, const, min/max, length, pattern, format, anyOf/allOf/oneOf/not, additionalProperties. Deterministic - check an agent's structured output before you trust it.
- JSON validate & format POST /api/json-format Validate, pretty-print, or minify JSON. Returns parse errors with position when invalid.
- JSON to CSV POST /api/json-to-csv Convert a JSON array of objects to CSV. Nested objects are flattened to dot-path columns.
Workflow
- Call json-validate to confirm the input is well-formed JSON (catches syntax errors, trailing commas, etc.).
- Call json-format to pretty-print with consistent indentation.
- Call json-to-csv to convert the JSON array to a CSV string for spreadsheet import.
Call it directly
Any x402 client pays the 402 and gets the whole workflow back in one response:
npx agent402-client call json-pipeline {"json":"[{\"name\":\"Alice\",\"age\":30}]"}
Run it in Claude
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest
Then paste this prompt into Claude:
Process this JSON using Agent402's json-pipeline skill pack: [{"name":"Alice","age":30}]. (1) Validate it, (2) pretty-print it, (3) convert to CSV. Report any validation issues and provide the formatted output.