Data Quality Check
Check a dataset against your rules (email format, ranges, patterns) or let it find problems itself. Returns a quality score and a report per field.
Pay by wallet (x402)
data-quality-check Example
Example answer
{
"issues": [],
"total_rows": 2,
"valid_rows": 2,
"issue_count": 0,
"field_report": [
{
"field": "age",
"null_count": 0,
"completeness": 100,
"unique_count": 2
},
{
"field": "city",
"null_count": 0,
"completeness": 100,
"unique_count": 2
},
{
"field": "name",
"null_count": 0,
"completeness": 100,
"unique_count": 2
}
],
"invalid_rows": 0,
"quality_score": 100
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
data | array | Yes | JSON array of objects |
rules | array | No | Optional validation rules |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
issues | array | Always (present in every successful answer) |
valid_rows | integer | Always (present in every successful answer) |
field_report | array | Always (present in every successful answer) |
invalid_rows | integer | Always (present in every successful answer) |
quality_score | integer | Always (present in every successful answer) |
How to call it
The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.
# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
-H "Authorization: Bearer $STRALE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"capability_slug": "data-quality-check",
"inputs": {
"data": [
{
"age": 30,
"city": "Stockholm",
"name": "Alice"
},
{
"age": 25,
"city": "Oslo",
"name": "Bob"
}
]
},
"max_price_cents": 2
}' {
"tool": "strale_execute",
"arguments": {
"slug": "data-quality-check",
"inputs": {
"data": [
{
"age": 30,
"city": "Stockholm",
"name": "Alice"
},
{
"age": 25,
"city": "Oslo",
"name": "Bob"
}
]
},
"max_price_cents": 2
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "data-quality-check",
inputs: {
"data": [
{
"age": 30,
"city": "Stockholm",
"name": "Alice"
},
{
"age": 25,
"city": "Oslo",
"name": "Bob"
}
]
},
max_price_cents: 2,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="data-quality-check",
inputs={
"data": [
{
"age": 30,
"city": "Stockholm",
"name": "Alice",
},
{
"age": 25,
"city": "Oslo",
"name": "Bob",
},
],
},
max_price_cents=2,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i -X POST https://api.strale.io/x402/v2/data-quality-check \
-H 'Content-Type: application/json' \
-d '{
"data": [
{
"age": 30,
"city": "Stockholm",
"name": "Alice"
},
{
"age": 25,
"city": "Oslo",
"name": "Bob"
}
]
}' Limitations
Domain-specific validation rules are not applied
Checks for common data quality issues (nulls, duplicates, type mismatches) — domain-specific validation rules are not applied
What to do instead: Combine with json-schema-validate to enforce domain-specific constraints on your data
Related tools
- Address Parser €0.05
- Company Industry Classification €0.05
- Company Name Match €0.02
- Credit Score Band €0.02
- CSV Cleaner €0.02
- CSV to JSON €0.02