# CSV schema validator

- Human page: https://happytails.ai/en/data-tools/csv-schema-validator/
- Markdown: https://happytails.ai/en/data-tools/csv-schema-validator.md
- Structured JSON: https://happytails.ai/agents/en/data-tools/csv-schema-validator/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `csv-schema-validator` |
| Category | data-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Automatic updates after valid input or file selection. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Runs locally on your device. CSV requires unique nonempty headers. Up to 1,000,000 characters, 10,000 data records and 100,000 cells across inputs, with 100 columns. Quoted multiline cells are supported. Each JSON settings field is limited to 100,000 characters. Output files are bounded to 4,000,000 characters. Diagnostic reports contain at most 500 findings and disclose the omitted count. Check an explicit happytails-csv-contract-v1 contract. Every declared column must exist. Empty optional cells skip value constraints. Unique compares exact nonempty strings; lengths count Unicode code points. Numeric arithmetic is exact.

### Inputs and settings

Text input: CSV data.

Example or placeholder shown in the interface (not a validated fixture):

```text
id,amount
A,10
A,-1
```

Paste CSV data with unique column headers. Quoted multiline cells are supported. Results update as you type. Up to 1,000,000 characters.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `separator` | Input CSV separator | select | "," | Allowed: ,, ;, 	 |
| `contract` | Data contract (JSON) | textarea | "{\n  \"format\": \"happytails-csv-contract-v1\",\n  \"columns\": [\n    {\n      \"name\": \"id\",\n      \"type\": \"text\",\n      \"required\": true,\n      \"unique\": true\n    },\n    {\n      \"name\": \"amount\",\n      \"type\": \"decimal\",\n      \"required\": true,\n      \"min\": \"0\"\n    }\n  ]\n}" |  |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Use happytails-csv-contract-v1 with text, integer, decimal, boolean or date types. Numeric bounds are decimal strings. Extra columns are rejected unless allowExtraColumns is true. Optional empty cells skip value checks. Up to 1,000,000 characters, 10,000 data records, 100 columns and 100,000 cells across the sources. Files for multi-source tools are limited to 4,000,000 bytes total. Reports retain at most 500 diagnostic findings and state any omitted count. CSV and JSON outputs are limited to 4,000,000 characters.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "csv-schema-validator",
  "category": "data-tools",
  "built": true,
  "requirements": "Use happytails-csv-contract-v1 with text, integer, decimal, boolean or date types. Numeric bounds are decimal strings. Extra columns are rejected unless allowExtraColumns is true. Optional empty cells skip value checks. Up to 1,000,000 characters, 10,000 data records, 100 columns and 100,000 cells across the sources. Files for multi-source tools are limited to 4,000,000 bytes total. Reports retain at most 500 diagnostic findings and state any omitted count. CSV and JSON outputs are limited to 4,000,000 characters.",
  "implementation": {
    "fields": [
      {
        "key": "separator",
        "label": "Input CSV separator",
        "value": ",",
        "type": "select",
        "values": [
          ",",
          ";",
          "\t"
        ]
      },
      {
        "key": "contract",
        "label": "Data contract (JSON)",
        "value": "{\n  \"format\": \"happytails-csv-contract-v1\",\n  \"columns\": [\n    {\n      \"name\": \"id\",\n      \"type\": \"text\",\n      \"required\": true,\n      \"unique\": true\n    },\n    {\n      \"name\": \"amount\",\n      \"type\": \"decimal\",\n      \"required\": true,\n      \"min\": \"0\"\n    }\n  ]\n}",
        "type": "textarea",
        "help": "Types: text, integer, decimal, boolean or date. Optional per-field rules: required, unique, min, max, enum, minLength, maxLength. Numeric bounds are quoted decimal strings. Set allowExtraColumns to true if needed."
      }
    ],
    "live": true,
    "presentation": "metrics",
    "note": "Runs locally on your device. CSV requires unique nonempty headers. Up to 1,000,000 characters, 10,000 data records and 100,000 cells across inputs, with 100 columns. Quoted multiline cells are supported. Each JSON settings field is limited to 100,000 characters. Output files are bounded to 4,000,000 characters. Diagnostic reports contain at most 500 findings and disclose the omitted count. Check an explicit happytails-csv-contract-v1 contract. Every declared column must exist. Empty optional cells skip value constraints. Unique compares exact nonempty strings; lengths count Unicode code points. Numeric arithmetic is exact.",
    "experience": {
      "automatic": true,
      "single": false,
      "inputMaxLength": 1000000,
      "inputMode": "text",
      "label": "CSV data",
      "placeholder": "id,amount\nA,10\nA,-1",
      "help": "Paste CSV data with unique column headers. Quoted multiline cells are supported. Results update as you type. Up to 1,000,000 characters.",
      "action": null
    },
    "mode": "automatic",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Check CSV columns, data types and value constraints against an explicit data contract.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

### How to use CSV schema validator

1. Paste the CSV to validate.
2. Define columns and constraints in the displayed JSON contract.
3. Review violations by field and data-record number, then download the report.

## Useful next steps

- [CSV type profiler](https://happytails.ai/en/data-tools/csv-type-profiler/) ([Markdown](https://happytails.ai/en/data-tools/csv-type-profiler.md))

- [Dataset constraint checker](https://happytails.ai/en/data-tools/dataset-constraint-checker/) ([Markdown](https://happytails.ai/en/data-tools/dataset-constraint-checker.md))

## Prepare the source

Paste the CSV to validate.

### Choose the matching rules

Define columns and constraints in the displayed JSON contract.

### Review and keep the result

Review violations by field and data-record number, then download the report. Use happytails-csv-contract-v1 with text, integer, decimal, boolean or date types. Numeric bounds are decimal strings. Extra columns are rejected unless allowExtraColumns is true. Optional empty cells skip value checks.
