validate_schema
Checks every parsed row against a supplied schema to flag type, required, unique, range, enum, and pattern errors with source row numbers.
Instructions
Check every row of a table against a schema, after the same parsing clean_table applies.
schema: {"columns": {"id": {"type": "integer", "required": true, "unique": true},
"email": {"type": "email", "required": true},
"amount": {"type": "decimal", "min": 0, "max": 100000},
"signup": {"type": "date", "min": "2020-01-01"},
"status": {"enum": ["active", "churned"]},
"sku": {"type": "text", "pattern": "[A-Z]{3}-\d{4}", "max_length": 8}},
"strict_columns": false}
Rules: type, required, unique (case-insensitive), min/max (numbers and dates), min_length/max_length, enum
(case-insensitive), pattern (full match; nested quantifiers are refused). Column names match case-insensitively.
strict_columns flags columns that are not in the schema. Errors carry the source row number; valid is
true only with zero errors. profile_table returns a suggested schema to start from.
Input (exactly one): content (CSV/TSV/JSON text), content_base64 (file bytes: .xlsx, or CSV in any encoding),
rows (JSON list of objects or of lists). delimiter: auto-detected (, ; tab |). sheet: Excel sheet name (default
the first). has_header: false when the first row is data. header_row: 1-based row of the header (default auto,
skipping title rows above it).
Parsing: number_locale 'eu' (1.234,56) or 'us' (1,234.56) settles values like 1,250 (auto from the column
otherwise). date_order 'dmy' or 'mdy' settles dates like 03/04/2026 (auto from the column otherwise).
phone_country (ISO-2, e.g. ES, US, GB) converts national phone numbers to E.164. null_values: extra strings
read as empty (NULL, N/A, -, #N/A and similar are already). types: force a type per column, e.g.
{"zip": "text", "amount": "decimal"}; types are text, integer, decimal, boolean, date, datetime, email, url,
phone, iban.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": {
"schema": "<schema>"
},
"name": "validate_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | ||
| sheet | No | ||
| schema | Yes | ||
| content | No | ||
| delimiter | No | ||
| date_order | No | ||
| has_header | No | ||
| header_row | No | ||
| max_errors | No | ||
| null_values | No | ||
| number_locale | No | ||
| phone_country | No | ||
| content_base64 | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||