MCPサーバー

Import Check: Validate & Clean CSV

io.github.LeBorgneAntoine/import-check
データ・分析 公開・接続可能 MCP 2025-11-25

このMCPでできること

Validates CSV files against explicit schemas and applies requested column cleanup and transformations.

clean_csv
Clean selected CSV columns and validate the result
Apply only requested column renames and transformations, then validate the output against schema. Cleanup column names refer to the original headers; schema names refer to the renamed output. Transformations run in listed order. decimal_comma changes only plain numbers such as 12,50; ambiguous grouping stays unchanged. No records or columns are removed. Returned csv_text is UTF-8-compatible with CRLF record endings. One paid operation includes cleanup and validation. Spreadsheet-safe escaping is opt-in and may make numeric negative cells fail numeric validation; inspect the final report before import.
入力スキーマ
{'type': 'object', '$defs': {'Change': {'type': 'object', 'title': 'Change', 'required': ['column', 'action'], 'properties': {'action': {'enum': ['trim', 'lowercase', 'uppercase', 'decimal_comma'], 'type': 'string', 'title': 'Action'}, 'column': {'type': 'string', 'title': 'Column', 'maxLength': 100, 'minLength': 1, 'description': 'Original header before any renaming.'}}, 'additionalProperties': False}, 'Column': {'type': 'object', 'title': 'Column', 'required': ['name'], 'properties': {'name': {'type': 'string', 'title': 'Name', 'maxLength': 100, 'minLength': 1, 'description': 'Exact, case-sensitive header after any cleanup rename.'}, 'type': {'enum': ['string', 'integer', 'decimal', 'boolean', 'date', 'email'], 'type': 'string', 'title': 'Type', 'default': 'string'}, 'unique': {'type': 'boolean', 'title': 'Unique', 'default': False, 'description': 'Require non-empty raw strings to be unique within this column.'}, 'choices': {'anyOf': [{'type': 'array', 'items': {'type': 'string'}, 'maxItems': 100}, {'type': 'null'}], 'title': 'Choices', 'default': None, 'description': 'Optional exact allowed strings, checked before type conversion.'}, 'maximum': {'anyOf': [{'type': 'string', 'maxLength': 100}, {'type': 'null'}], 'title': 'Maximum', 'default': None, 'description': 'Inclusive numeric bound, as a decimal string. Numeric columns only.'}, 'minimum': {'anyOf': [{'type': 'string', 'maxLength': 100}, {'type': 'null'}], 'title': 'Minimum', 'default': None, 'description': 'Inclusive numeric bound, as a decimal string. Numeric columns only.'}, 'required': {'type': 'boolean', 'title': 'Required', 'default': True, 'description': 'Reject an empty value. Every declared header must exist regardless.'}, 'max_length': {'type': 'integer', 'title': 'Max Length', 'default': 10000, 'maximum': 10000, 'minimum': 1}}, 'additionalProperties': False}, 'Cleanup': {'type': 'object', 'title': 'Cleanup', 'properties': {'rename': {'type': 'object', 'title': 'Rename', 'description': 'Original header to new header; simultaneous rename, no dropping columns.', 'additionalProperties': {'type': 'string'}}, 'changes': {'type': 'array', 'items': {'$ref': '#/$defs/Change'}, 'title': 'Changes', 'maxItems': 100, 'description': 'Applied in order to explicitly named original columns only.'}, 'spreadsheet_safe': {'type': 'boolean', 'title': 'Spreadsheet Safe', 'default': False, 'description': 'Prefix cells starting with spreadsheet formula markers with an apostrophe. Output is then revalidated; numeric negatives may fail numeric types.'}}, 'additionalProperties': False}, 'CsvSchema': {'type': 'object', 'title': 'CsvSchema', 'required': ['columns'], 'properties': {'columns': {'type': 'array', 'items': {'$ref': '#/$defs/Column'}, 'title': 'Columns', 'maxItems': 100, 'minItems': 1}, 'allow_extra_columns': {'type': 'boolean', 'title': 'Allow Extra Columns', 'default': False}}, 'additionalProperties': False}}, 'title': 'clean_csvArguments', 'required': ['csv_text', 'schema', 'cleanup'], 'properties': {'schema': {'$ref': '#/$defs/CsvSchema'}, 'cleanup': {'$ref': '#/$defs/Cleanup'}, 'csv_text': {'type': 'string', 'title': 'Csv Text'}, 'delimiter': {'enum': [',', ';', '\t', '|'], 'type': 'string', 'title': 'Delimiter', 'default': ','}, 'request_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Request Id', 'default': None}}}
get_csv_example
Get a complete CSV and schema example
Return a fixed synthetic CSV and its column schema. Free, no key or quota. Copy the structure, then supply your own CSV to validate_csv.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'title': 'get_csv_exampleArguments', 'properties': {}}
get_csv_usage
Check remaining CSV operations
Read remaining operations and expiry for the API key supplied in the Authorization header. Does not consume credit.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'title': 'get_csv_usageArguments', 'properties': {}}
get_table_example
Get an exact-key table join example
Return fixed synthetic left/right tables and a reusable join recipe. No arguments, key or credit. Copy the structure for reconcile_tables; mode controls which unmatched rows appear in output.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'title': 'get_table_exampleArguments', 'properties': {}}
inspect_table
Inspect table columns without guessing types
Profile a CSV or explicit string table before writing a recipe. Return empty, distinct and duplicate-value counts per column and complete formula warnings; no schema or business validity is inferred. Supply CSV OR columns/rows, never both. JSON numbers must be encoded as strings so identifiers keep leading zeros. One paid operation; no content retained. Reuse request_id only for identical input.
入力スキーマ
{'type': 'object', '$defs': {'TableInput': {'type': 'object', 'title': 'TableInput', 'properties': {'rows': {'anyOf': [{'type': 'array', 'items': {'type': 'array', 'items': {'type': 'string', 'maxLength': 10000}, 'maxItems': 100}, 'maxItems': 10000}, {'type': 'null'}], 'title': 'Rows', 'default': None}, 'columns': {'anyOf': [{'type': 'array', 'items': {'type': 'string', 'maxLength': 100, 'minLength': 1}, 'maxItems': 100, 'minItems': 1}, {'type': 'null'}], 'title': 'Columns', 'default': None}, 'csv_text': {'anyOf': [{'type': 'string', 'maxLength': 1000000}, {'type': 'null'}], 'title': 'Csv Text', 'default': None, 'description': 'CSV including headers; no paths or URLs.'}, 'delimiter': {'enum': [',', ';', '\t', '|'], 'type': 'string', 'title': 'Delimiter', 'default': ','}}, 'additionalProperties': False}}, 'title': 'inspect_tableArguments', 'required': ['table'], 'properties': {'table': {'$ref': '#/$defs/TableInput'}, 'request_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Request Id', 'default': None}}}
prepare_table
Prepare a table using reusable column rules
Select, rename, derive and convert columns using a caller-owned version-1 recipe. Rules reference original input headers; output follows recipe order and omitted columns are listed. All input rows remain. Any failed conversion returns valid=false, all findings and csv_text=null, never a partially transformed file. No arithmetic, arbitrary code, schema inference or destination writes. One completed report costs one operation, including valid=false. Use reconcile_tables for two-file matching.
入力スキーマ
{'type': 'object', '$defs': {'Recipe': {'type': 'object', 'title': 'Recipe', 'required': ['columns'], 'properties': {'columns': {'type': 'array', 'items': {'$ref': '#/$defs/OutputColumn'}, 'title': 'Columns', 'maxItems': 100, 'minItems': 1, 'description': 'Explicit output order; unselected input columns are omitted and reported.'}, 'version': {'type': 'integer', 'const': 1, 'title': 'Version', 'default': 1}, 'output_delimiter': {'enum': [',', ';', '\t', '|'], 'type': 'string', 'title': 'Output Delimiter', 'default': ','}, 'spreadsheet_safe': {'type': 'boolean', 'title': 'Spreadsheet Safe', 'default': False}}, 'additionalProperties': False}, 'TableInput': {'type': 'object', 'title': 'TableInput', 'properties': {'rows': {'anyOf': [{'type': 'array', 'items': {'type': 'array', 'items': {'type': 'string', 'maxLength': 10000}, 'maxItems': 100}, 'maxItems': 10000}, {'type': 'null'}], 'title': 'Rows', 'default': None}, 'columns': {'anyOf': [{'type': 'array', 'items': {'type': 'string', 'maxLength': 100, 'minLength': 1}, 'maxItems': 100, 'minItems': 1}, {'type': 'null'}], 'title': 'Columns', 'default': None}, 'csv_text': {'anyOf': [{'type': 'string', 'maxLength': 1000000}, {'type': 'null'}], 'title': 'Csv Text', 'default': None, 'description': 'CSV including headers; no paths or URLs.'}, 'delimiter': {'enum': [',', ';', '\t', '|'], 'type': 'string', 'title': 'Delimiter', 'default': ','}}, 'additionalProperties': False}, 'OutputColumn': {'type': 'object', 'title': 'OutputColumn', 'required': ['name'], 'properties': {'name': {'type': 'string', 'title': 'Name', 'maxLength': 100, 'minLength': 1}, 'concat': {'anyOf': [{'type': 'array', 'items': {'type': 'string', 'maxLength': 100, 'minLength': 1}, 'maxItems': 10, 'minItems': 1}, {'type': 'null'}], 'title': 'Concat', 'default': None}, 'source': {'anyOf': [{'type': 'string', 'maxLength': 100, 'minLength': 1}, {'type': 'null'}], 'title': 'Source', 'default': None}, 'actions': {'type': 'array', 'items': {'enum': ['trim', 'lowercase', 'uppercase', 'decimal_comma', 'date_dmy', 'date_mdy'], 'type': 'string'}, 'title': 'Actions', 'maxItems': 10, 'description': 'Ordered rules. Dates explicitly use DD/MM/YYYY or MM/DD/YYYY; failed conversions block the output.'}, 'literal': {'anyOf': [{'type': 'string', 'maxLength': 10000}, {'type': 'null'}], 'title': 'Literal', 'default': None}, 'separator': {'type': 'string', 'title': 'Separator', 'default': '', 'maxLength': 100}}, 'additionalProperties': False}}, 'title': 'prepare_tableArguments', 'required': ['table', 'recipe'], 'properties': {'table': {'$ref': '#/$defs/TableInput'}, 'recipe': {'$ref': '#/$defs/Recipe'}, 'request_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Request Id', 'default': None}}}
reconcile_tables
Reconcile two tables with exact keys and complete findings
Join two bounded tables using exact string or composite keys. Both sides must have non-empty unique keys: duplicates block the entire output, including many-to-many matches. Choose left, inner or full retention explicitly; unmatched records are reported even if excluded. Optional compare fields flag changed values without resolving them. Output includes row lineage; missing-side fields are empty strings. No trimming, fuzzy matching or destination writes. Combined inputs share 1 MB/10,000 records/250,000 cells. One completed report costs one operation; reuse request_id for identical retries. Full findings or an uncharged size error, never silent truncation.
入力スキーマ
{'type': 'object', '$defs': {'KeyPair': {'type': 'object', 'title': 'KeyPair', 'required': ['left', 'right'], 'properties': {'left': {'type': 'string', 'title': 'Left', 'maxLength': 100, 'minLength': 1}, 'right': {'type': 'string', 'title': 'Right', 'maxLength': 100, 'minLength': 1}}, 'additionalProperties': False}, 'JoinColumn': {'type': 'object', 'title': 'JoinColumn', 'required': ['name', 'side', 'column'], 'properties': {'name': {'type': 'string', 'title': 'Name', 'maxLength': 100, 'minLength': 1}, 'side': {'enum': ['left', 'right'], 'type': 'string', 'title': 'Side'}, 'column': {'type': 'string', 'title': 'Column', 'maxLength': 100, 'minLength': 1}}, 'additionalProperties': False}, 'JoinRecipe': {'type': 'object', 'title': 'JoinRecipe', 'required': ['keys', 'mode', 'columns'], 'properties': {'keys': {'type': 'array', 'items': {'$ref': '#/$defs/KeyPair'}, 'title': 'Keys', 'maxItems': 10, 'minItems': 1, 'description': 'Exact string composite key. Empty or duplicate keys on either side block output.'}, 'mode': {'enum': ['left', 'inner', 'full'], 'type': 'string', 'title': 'Mode', 'description': 'Explicit row-retention choice. Unmatched rows are always reported, including those excluded from output.'}, 'columns': {'type': 'array', 'items': {'$ref': '#/$defs/JoinColumn'}, 'title': 'Columns', 'maxItems': 100, 'minItems': 1}, 'compare': {'type': 'array', 'items': {'$ref': '#/$defs/KeyPair'}, 'title': 'Compare', 'maxItems': 100, 'description': 'Optional paired fields; unequal matched values produce value_changed warnings, not automatic resolution.'}, 'version': {'type': 'integer', 'const': 1, 'title': 'Version', 'default': 1}, 'output_delimiter': {'enum': [',', ';', '\t', '|'], 'type': 'string', 'title': 'Output Delimiter', 'default': ','}, 'spreadsheet_safe': {'type': 'boolean', 'title': 'Spreadsheet Safe', 'default': False}}, 'additionalProperties': False}, 'TableInput': {'type': 'object', 'title': 'TableInput', 'properties': {'rows': {'anyOf': [{'type': 'array', 'items': {'type': 'array', 'items': {'type': 'string', 'maxLength': 10000}, 'maxItems': 100}, 'maxItems': 10000}, {'type': 'null'}], 'title': 'Rows', 'default': None}, 'columns': {'anyOf': [{'type': 'array', 'items': {'type': 'string', 'maxLength': 100, 'minLength': 1}, 'maxItems': 100, 'minItems': 1}, {'type': 'null'}], 'title': 'Columns', 'default': None}, 'csv_text': {'anyOf': [{'type': 'string', 'maxLength': 1000000}, {'type': 'null'}], 'title': 'Csv Text', 'default': None, 'description': 'CSV including headers; no paths or URLs.'}, 'delimiter': {'enum': [',', ';', '\t', '|'], 'type': 'string', 'title': 'Delimiter', 'default': ','}}, 'additionalProperties': False}}, 'title': 'reconcile_tablesArguments', 'required': ['left', 'right', 'recipe'], 'properties': {'left': {'$ref': '#/$defs/TableInput'}, 'right': {'$ref': '#/$defs/TableInput'}, 'recipe': {'$ref': '#/$defs/JoinRecipe'}, 'request_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Request Id', 'default': None}}}
validate_csv
Validate a CSV before importing it
Check a CSV against your explicit schema; return all issue counts and at most 200 detailed findings. Headers match exactly; required=false permits empty cells, not missing headers. Unique compares raw non-empty strings. Dates use YYYY-MM-DD, decimals use a dot without grouping, booleans use true/false. A valid=false report is a completed paid operation, not a tool failure. No values are changed; use clean_csv for explicit transformations. Validity covers only the supplied rules, not destination-system or business correctness.
入力スキーマ
{'type': 'object', '$defs': {'Column': {'type': 'object', 'title': 'Column', 'required': ['name'], 'properties': {'name': {'type': 'string', 'title': 'Name', 'maxLength': 100, 'minLength': 1, 'description': 'Exact, case-sensitive header after any cleanup rename.'}, 'type': {'enum': ['string', 'integer', 'decimal', 'boolean', 'date', 'email'], 'type': 'string', 'title': 'Type', 'default': 'string'}, 'unique': {'type': 'boolean', 'title': 'Unique', 'default': False, 'description': 'Require non-empty raw strings to be unique within this column.'}, 'choices': {'anyOf': [{'type': 'array', 'items': {'type': 'string'}, 'maxItems': 100}, {'type': 'null'}], 'title': 'Choices', 'default': None, 'description': 'Optional exact allowed strings, checked before type conversion.'}, 'maximum': {'anyOf': [{'type': 'string', 'maxLength': 100}, {'type': 'null'}], 'title': 'Maximum', 'default': None, 'description': 'Inclusive numeric bound, as a decimal string. Numeric columns only.'}, 'minimum': {'anyOf': [{'type': 'string', 'maxLength': 100}, {'type': 'null'}], 'title': 'Minimum', 'default': None, 'description': 'Inclusive numeric bound, as a decimal string. Numeric columns only.'}, 'required': {'type': 'boolean', 'title': 'Required', 'default': True, 'description': 'Reject an empty value. Every declared header must exist regardless.'}, 'max_length': {'type': 'integer', 'title': 'Max Length', 'default': 10000, 'maximum': 10000, 'minimum': 1}}, 'additionalProperties': False}, 'CsvSchema': {'type': 'object', 'title': 'CsvSchema', 'required': ['columns'], 'properties': {'columns': {'type': 'array', 'items': {'$ref': '#/$defs/Column'}, 'title': 'Columns', 'maxItems': 100, 'minItems': 1}, 'allow_extra_columns': {'type': 'boolean', 'title': 'Allow Extra Columns', 'default': False}}, 'additionalProperties': False}}, 'title': 'validate_csvArguments', 'required': ['csv_text', 'schema'], 'properties': {'schema': {'$ref': '#/$defs/CsvSchema'}, 'csv_text': {'type': 'string', 'title': 'Csv Text', 'description': 'CSV text including header. UTF-8, at most 1 MB; no file paths or URLs.'}, 'delimiter': {'enum': [',', ';', '\t', '|'], 'type': 'string', 'title': 'Delimiter', 'default': ','}, 'request_id': {'anyOf': [{'type': 'string'}, {'type': 'null'}], 'title': 'Request Id', 'default': None, 'description': 'Optional 8–128 character retry key. Reuse only for identical arguments; changed data requires a new key.'}}}
view_csv_demo
Run the free CSV validation demo
Validate the fixed example with the current engine. Free and no arguments; demonstrates duplicate, email, amount and date findings. Custom files require validate_csv and paid access.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'title': 'view_csv_demoArguments', 'properties': {}}
view_table_demo
Run the free table reconciliation demo
Join the bundled fixed tables and show changed and unmatched records. No arguments, key or credit. This cannot process custom data; use reconcile_tables with a paid key for your files.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'title': 'view_table_demoArguments', 'properties': {}}
追加
reconcile_tables
2026年10月4日2:40
追加
prepare_table
2026年10月4日2:40
追加
inspect_table
2026年10月4日2:40
追加
view_table_demo
2026年10月4日2:40
追加
get_table_example
2026年10月4日2:40
追加
clean_csv
2026年10月2日2:40
追加
validate_csv
2026年10月2日2:40
追加
get_csv_usage
2026年10月2日2:40
追加
view_csv_demo
2026年10月2日2:40
追加
get_csv_example
2026年10月2日2:40