check_privacy
Answer both privacy questions together: privacy scores the OUTPUT (re-identification risk, k-anonymity), leaks scores the RECIPE ITSELF (a real value pasted…
Last updated 2026-09-13 · Generated from mcp-schemas/tools/13-check_privacy · Markdown
Answer both privacy questions together: privacy scores the OUTPUT (re-identification risk, k-anonymity), leaks scores the RECIPE ITSELF (a real value pasted in as an enum, default or pattern). A recipe can leak while its output scores safe, and that combination is the one worth catching. Neither reads a real source file.
Inputs and outputs
- graph_json (string, required) — The recipe as a JSON string.
- n_rows (number) — Rows to assess. Omit to honour the recipe.
- seed (number | string) — Optional. A number pins the run — same recipe + same seed = byte-identical, forever. "today" uses YYYYMMDD, so every run today matches and tomorrow differs. "now" gives a fresh dataset each run. Both are recorded in the receipt as the number they resolved to, so any run stays reproducible.…
- scenario (string) — see the input schema
When to call it
Two questions that are asked together and mean different things.
privacy is about the output — could a generated row be re-identified. leaks is about the recipe itself — whether a real value was pasted in as an enum, a default or a pattern. That second one matters because the recipe is the artifact that gets committed and shared, and no amount of regeneration undoes a real value sitting inside it.
A recipe can leak while its output scores perfectly safe. That combination is the one worth catching, and it is why these are returned together rather than as two tools.
Example request
{
"_comment": "Re-identification risk on a small, low-cardinality world.",
"name": "check_privacy",
"arguments": {
"graph_json": {
"$schema": "https://theworklens.com/schema/recipe/v1.json",
"version": 1,
"project": "bike-assembly",
"region": "NZ",
"seed": 4242,
"output": {
"format": "csv"
},
"manifest": {
"name": "bike-assembly",
"version": "1.0.0",
"owner": "worklens-reference",
"domain": "manufacturing"
},
"entities": [
{
"name": "Part",
"rows": 40,
"fields": [
{
"name": "part_id",
"type": "id",
"unique": true
},
{
"name": "part_name",
"type": "enum",
"values": [
"Frame",
"Fork",
"Front wheel",
"Rear wheel",
"Chain",
"Crankset",
"Saddle",
"Handlebar",
"Brake caliper",
"Derailleur"
]
},
{
"name": "supplier_name",
"type": "person.fullName"
},
{
"name": "nhi",
"type": "id",
"unique": true
},
{
"name": "kind",
"type": "enum",
"values": [
"frame",
"wheel",
"drivetrain",
"fitting"
],
"weights": [
10,
25,
25,
40
]
},
{
"name": "unit_cost",
"type": "float",
"min": 5,
"max": 900,
"shape": "long_tail"
},
{
"name": "assembly_cost",
"type": "float",
"rollup": "sum(unit_cost)"
}
],
"graph": {
"edges": "Assembly",
"parent": "assembly_id",
"child": "component_id",
"qty": "quantity"
}
},
{
"name": "Assembly",
"rows": 90,
"fields": [
{
"name": "assembly_id",
"tyTruncated for the page; the full request sits beside the tool’s schema in the repository.
Example response
{
"contract_version": 3,
"privacy": {
"error": "missing_packs",
"missing": [
{
"entity": "Part",
"field": "supplier_name",
"needs": "given names and surnames (roles person.givenName and person.familyName)",
"why": "no NZ locale pack is registered — register one"
}
],
"next_step": "Nothing was generated and no placeholder was written. Register a pack that supplies what is listed — plan_packs says how many values each column needs — or give the column a pool, a role, a pattern or a list of values; then run the same recipe again.",
"region": "NZ"
},
"leaks": {
"data_free": true,
"findings": []
}
}