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
| Field | Type | Required | What it is |
|---|---|---|---|
csv | string | Yes | Messy CSV string to clean |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
csv | string | Always (present in every successful answer) |
row_count | integer | Always (present in every successful answer) |
column_count | integer | Always (present in every successful answer) |
issues_fixed | array | Always (present in every successful answer) |
detected_delimiter | string | Always (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
}' {
"tool": "strale_execute",
"arguments": {
"slug": "csv-clean",
"inputs": {
"csv": "name,age,city\nAlice,30,Stockholm\nBob,25,Oslo"
},
"max_price_cents": 2
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "csv-clean",
inputs: {
"csv": "name,age,city\nAlice,30,Stockholm\nBob,25,Oslo"
},
max_price_cents: 2,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="csv-clean",
inputs={
"csv": "name,age,city\nAlice,30,Stockholm\nBob,25,Oslo",
},
max_price_cents=2,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/csv-clean?csv=name%2Cage%2Ccity%0AAlice%2C30%2CStockholm%0ABob%2C25%2COslo' 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
Related tools
- Address Parser €0.05
- Company Industry Classification €0.05
- Company Name Match €0.02
- Credit Score Band €0.02
- CSV to JSON €0.02
- Data Quality Check €0.02