# Whitespace Clean — REST API endpoint `whitespace-clean`

Clean whitespace in text: trim, collapse runs of spaces, remove blank lines, normalize newlines.

- Category: text
- 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/whitespace-clean/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/whitespace-clean/
- Same tool on the other surface: https://findutils.com/mcp/whitespace-clean/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/whitespace-clean/execute \
  -H "Content-Type: application/json" \
  -d '{
    "text": "  hello   world  "
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/whitespace-clean
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `text` | string | yes | Text to clean. |
| `trim` | boolean | no | Trim leading/trailing whitespace. Defaults to true. Default: `true`. |
| `collapse_spaces` | boolean | no | Collapse runs of non-newline whitespace to single space. Defaults to true. Default: `true`. |
| `remove_blank_lines` | boolean | no | Drop lines that are only whitespace. Defaults to false. Default: `false`. |
| `normalize_newlines` | boolean | no | Convert CRLF/CR to LF. Defaults to true. Default: `true`. |

Example arguments (verified):

```json
{
  "text": "  hello   world  "
}
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

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

Then ask the client to call `findutils:whitespace_clean`. Full MCP reference: https://findutils.com/mcp/whitespace-clean/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
