Clean table
clean_tableClean a table: trim whitespace in cells, drop fully empty rows, and optionally remove duplicate rows; returns the table in the same format with before/after row counts. Use when preparing messy pasted data. Do NOT use to change format; use convert_table.
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": {
"data": "<data>"
},
"name": "clean_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The whole table as text, first row = header. CSV/TSV text (quoted cells allowed), or a JSON array of flat objects, e.g. "name,age\nAsha,30". | |
| trim | No | Trim leading/trailing whitespace in every cell. Default true. | |
| dedupe | No | Remove exact duplicate data rows, keeping the first. Default false. | |
| format | No | Format of 'data' and of the returned table: csv, tsv or json. Default csv. | |
| drop_empty_rows | No | Remove rows whose cells are all empty. Default true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The cleaned table as text in the input format. | |
| rows_after | Yes | Data rows after cleaning (excluding header). | |
| rows_before | Yes | Data rows before cleaning (excluding header). |