---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/artifacts/xml/variables/xmlToJsonTool.md
description: A tool that converts XML (inline or from an artifact) to JSON.
---

# Variable: xmlToJsonTool

```ts
const xmlToJsonTool: Tool<SpooledJsonArtifact<unknown>>;
```

Defined in: [src/batteries/artifacts/xml/index.ts:559](https://github.com/NHTIO/ADK/blob/v1.20260907.0/src/src/batteries/artifacts/xml/index.ts#L559)

A tool that converts XML (inline or from an artifact) to JSON.

## Remarks

Input is either `text` (inline XML) or `call_id` (an XML artifact from earlier in this turn).
Provide exactly one. Returns a new [SpooledJsonArtifact](../../../../spooled_artifact/classes/SpooledJsonArtifact.md).
