# Xml Formatter — MCP tool `findutils:xml_formatter`

Beautify or minify an XML document and return the formatted text. The input is checked for well-formedness first (balanced tags, quoted attributes, one root element); a malformed document returns an error that names the problem and its line. Beautify re-indents one element per line; minify removes whitespace between tags.

- Category: validation
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/xml-formatter/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/mcp/xml-formatter/
- Same tool on the other surface: https://findutils.com/api/xml-formatter/

## Connect

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Claude Desktop (`claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "findutils": {
      "url": "https://mcp.findutils.com/"
    }
  }
}
```

## Call the tool (verified example)

```bash
curl -X POST https://mcp.findutils.com/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "xml_formatter",
      "arguments": {
        "xml": "<root><a>1</a><b/></root>"
      }
    }
  }'
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `xml` | string | yes | The XML source to format or minify. |
| `mode` | string (beautify \| minify) | no | beautify = indent one element per line, minify = compact. Default: beautify. Default: `"beautify"`. |
| `indent` | integer | no | Spaces per indentation level in beautify mode (1-8). Default: 2. Default: `2`. |

Example arguments (verified):

```json
{
  "xml": "<root><a>1</a><b/></root>"
}
```

## Also a REST endpoint

```bash
curl -X POST https://api.findutils.com/api/tools/xml-formatter/execute \
  -H "Content-Type: application/json" \
  -d '{
    "xml": "<root><a>1</a><b/></root>"
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/xml-formatter
```

Full REST reference: https://findutils.com/api/xml-formatter/ · OpenAPI 3.1 spec: https://findutils.com/api/openapi.json

---
Full catalog: POST https://mcp.findutils.com/ with method `tools/list` · https://findutils.com/mcp/ · https://findutils.com/llms.txt
