Data format converter
CSV to JSON to YAML pipeline - convert tabular data through the common interchange formats in one chain.
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 has CSV data and needs it in both JSON and YAML for different consumers (an API expects JSON, a config file needs YAML). This chain parses the CSV into JSON, then converts that JSON to YAML - two hops, 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.
- CSV to JSON POST /api/csv-to-json Parse CSV (quoted fields supported) into a JSON array of objects, using the first row as headers (header=false for arrays).
- JSON validate & format POST /api/json-format Validate, pretty-print, or minify JSON. Returns parse errors with position when invalid.
- JSON to YAML POST /api/json-to-yaml Convert JSON to YAML.
Workflow
- Call csv-to-json to parse the CSV into a JSON array of objects (headers become keys).
- Call json-format to pretty-print that JSON - the JSON consumer gets clean, indented output rather than a single dense line.
- Call json-to-yaml on the resulting JSON to produce clean YAML output.
Call it directly
Any x402 client pays the 402 and gets the whole workflow back in one response:
npx agent402-client call data-convert {"csv":"name,age\\nAlice,30"}
Run it in Claude
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest
Then paste this prompt into Claude:
Convert this CSV through Agent402's data-convert pipeline: 'name,age\nAlice,30'. (1) Parse to JSON, (2) pretty-print the JSON, (3) convert to YAML. Return the JSON and YAML representations.