# agent402.tools XML-to-JSON Workflow

> agent402.tools XML-to-JSON Workflow is a paid API for AI agents from agent402.tools, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Converts an XML string to formatted, validated JSON in a single bundled call (runs xml-to-json, json-format, and json-validate under the hood)

## Facts

- Endpoint: POST https://agent402.tools/api/skill/xml-json
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-xml-to-json-workflow-f27257ef
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Nle0AvvRKFbgwRxlQkNye

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-xml-to-json-workflow-f27257ef -d '<json body>'
```

Example prompt: Take this XML string and convert it to clean, pretty-printed JSON for me: '<catalog><book id="1"><title>XML Developer Guide</title><price>44.95</price></book></catalog>'

## When to prefer this

Choose this endpoint when you need to convert legacy XML API responses or data feeds to modern JSON format in a single call, and you also want the output to be pretty-printed and validated — saving you from chaining three separate tool calls. Ideal for agents integrating with SOAP or older REST services that still return XML.

## Known failure modes

- Malformed or invalid XML input causes a parsing error
- Extremely large XML payloads may time out or be rejected
- XML with namespaces or mixed content may produce unexpected JSON structure
- Payment failure (x402) prevents execution entirely
- Partial execution not possible — all three sub-tools run atomically or fail

## How this service works

Bundled execution of the XML to JSON workflow — Convert XML to JSON and pretty-print it — the 'legacy API response to modern format' workflow in one call. One x402 payment runs 3 underlying tools (xml-to-json, json-format, json-validate); partial-...

## Output

A formatted, pretty-printed JSON representation of the submitted XML, along with validation status confirming the output is well-formed JSON — all produced in a single bundled call that runs three underlying tools (xml-to-json, json-format, json-validate).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "xml": {
   "type": "string",
   "description": "XML string to convert"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "args": {
   "xml": "<root><item>hello</item></root>"
  },
  "pack": "xml-json",
  "steps": [
   {
    "ok": true,
    "slug": "xml-to-json",
    "result": {}
   },
   {
    "ok": true,
    "slug": "json-format",
    "result": {}
   },
   {
    "ok": true,
    "slug": "json-validate",
    "result": {}
   }
  ],
  "summary": "3/3 steps succeeded"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-xml-to-json-workflow-f27257ef/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
