util_csv_clean
CSV clean (auto-fix messy data) — Clean a messy CSV in one call, offline: trims and collapses whitespace, turns null tokens (NA, N/A, null, none, -, #N/A, plus your own nulls=) into blanks, removes empty rows, empty columns and exact duplicate rows, repairs ragged rows, renames headers to unique snake_case (headers=snake|lower|keep), standardizes date columns to YYYY-MM-DD (Jan 5 2024, 1/5/24, 05-01-2024; detects day-first vs month-first per column, dayfirst=1 to force), strips currency symbols, thousands separators and accounting parentheses from numeric columns while keeping ZIP codes and IDs with leading zeros as text, and normalizes yes/no/Y/N columns to true/false. Returns the cleaned CSV, per-column detected types, counts of every change and a sample of before/after edits. Turn steps off with dedupe=0, dates=0, numbers=0, bools=0, dropEmpty=0. Auto-detects comma, tab, semicolon or pipe (delimiter= to force). Up to 20,000 rows. Price: $0.003 USDC (Base, via x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"csv": "<csv>"
},
"name": "util_csv_clean"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | Yes | e.g. Customer Name,Signup Date,Amount,ZIP,Active Ann Lee ,Jan 5 2024,"$1,200.50",02134,yes Bob Ray,2/14/2024,(300),37203,N Bob Ray,2/14/2024,(300),37203,N Cy Dow,N/A,45,90210,Y |