← All tools

Data / VERSION 1

Validate CSV rows

Parse comma-separated records, trim fields on request, and report rows that do not match the header.

Available via local MCP
RuntimeLocal DockerNetworkNoneRequest / result256 KiB eachProvider costNo API fees; local compute

Give it a task.

Use this MCP call after connecting Piwi. The output below is the result asserted by this tool's tests.

MCP tool call
{
  "name": "piwi_run_csv_clean",
  "arguments": {
    "input": {
      "csv": "name,email\n Ada ,[email protected]\ninvalid",
      "trim": true
    }
  }
}
Expected output
{
  "headers": [
    "name",
    "email"
  ],
  "rows": [
    {
      "name": "Ada",
      "email": "[email protected]"
    }
  ],
  "errors": [
    {
      "row": 3,
      "expected": 2,
      "actual": 1
    }
  ]
}

Inputs

  • csv: UTF-8 CSV text
  • trim: boolean (default false)

Outputs

  • headers
  • rows: accepted records
  • errors: row number and field count