mcp-validation-server
v0.1.0Model Context Protocol server exposing deterministic data-validation tools: contract validation with quarantine, reconciliation, distinct entity counts, and…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
validate_rows
Validate rows against a column contract and quarantine what fails. Use this when you have tabular data (spreadsheet rows, CSV records, query results) and you need to know which records are trustworthy before using them. It applies each column's rules — required, type, range, pattern, allowed values — and returns two lists: the rows that passed, and an explicit quarantine list giving a reason for every row that did not. Nothing is ever silently dropped. `accepted` plus `quarantine` always equals the number of rows you passed in, and each quarantined entry carri…
| Parameter | Type | Description |
|---|---|---|
columns * | array | |
rows * | array | |
row_key |
reconcile
Check that opening + movements = closing, and show both sides and the variance. Use this whenever a period of numbers is supposed to add up: a bank reconciliation, a roll-forward, a statement extract, a ledger movement summary. It is the check that does not depend on how plausible any single figure looked. If the arithmetic does not close, the numbers are wrong even if every field looked fine on its own — that is the failure that survives field-level validation and reaches a report. This tool is deterministic arithmetic. It has no opinion about whether the m…
| Parameter | Type | Description |
|---|---|---|
closing_balance * | ||
movements * | ||
opening_balance * | ||
tolerance | number |
count_distinct
Count distinct entities on a stable key, and report the gap to a row count. Use this instead of counting rows whenever the unit you are reporting on is an entity — customers, patients, households, sites, invoices — rather than a line in a table. One customer can appear on fifty rows; "50" is a row count, not a customer count, and the difference is the error that survives review because the number looks plausible. This tool returns both numbers and the difference between them, broken into the two causes: keys repeated across rows, and rows that carry no usable…
| Parameter | Type | Description |
|---|---|---|
key * | string | |
rows * | array | |
case_sensitive | boolean |
duplicate_report
Find suspected duplicate groups and return them for human review. Use this when the same real entity may be recorded more than once — a re-registration, a rename, a typo in a reference field — and you need to know how much of the data that affects before trusting any count. This tool NEVER merges, deletes, or picks a winner. Every group it returns is a suspicion with `auto_merged: false` and `decision_required: true`, plus a `review_question` phrased for a person. A silent merge corrupts counts invisibly and is very hard to unpick later, so the output is a rev…
| Parameter | Type | Description |
|---|---|---|
key * | string | |
rows * | array | |
case_sensitive | boolean | |
match_fields | ||
max_groups | integer | |
similarity_threshold |