CSV Cleaner

Fix messy CSV: mixed delimiters and encodings, byte-order marks, trailing commas and broken quoting. Returns clean CSV and what was fixed.

Pay by wallet (x402) csv-clean

Example

Example answer
{
  "csv": "name,age,city\nAlice,30,Stockholm\nBob,25,Oslo",
  "row_count": 3,
  "column_count": 3,
  "issues_fixed": [],
  "detected_delimiter": ","
}

Inputs

FieldTypeRequiredWhat it is
csvstringYesMessy CSV string to clean

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
csvstringAlways (present in every successful answer)
row_countintegerAlways (present in every successful answer)
column_countintegerAlways (present in every successful answer)
issues_fixedarrayAlways (present in every successful answer)
detected_delimiterstringAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "csv-clean",
    "inputs": {
      "csv": "name,age,city\nAlice,30,Stockholm\nBob,25,Oslo"
    },
    "max_price_cents": 2
  }'

Limitations

  • Severely malformed CSV may need manual preparation

    Handles common CSV issues (encoding, delimiters, quoting) — extremely malformed files may require manual preprocessing

    What to do instead: If cleaning fails, specify the exact delimiter and encoding in the input parameters