# 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…

Section: MCP · Type: tool · Last updated: 2026-09-13

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.

## The picture

Agent (calls) → check_privacy (Prove) → Result (as data)

## Inputs

- 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

```json
{
  "_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",
              "ty
```

Truncated for the page; the full request sits beside the tool’s schema in the repository.

## Example response

```json
{
  "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": []
  }
}
```

## Same step

- [prove_recipe](https://theworklens.com/docs/mcp/tools/prove-recipe): Return the full proof for a recipe as DATA (schema worklens.proof.v2): consistency, privacy, independent property verification and a tamper-evident receipt, under one top-level passed. Use when you need the proof itself rather than the file handle the generate tools return. Read verification before realism — it is…
- [verify_world](https://theworklens.com/docs/mcp/tools/verify-world): Check that a company file and the job files pointing at it still agree. Each job file is validated ALONE, so the two facts it cannot know go unchecked: how many rows a borrowed entity has, and which company (seed) this is. Get the seed wrong and every key still resolves — against different people — and both runs…
- [score_realism](https://theworklens.com/docs/mcp/tools/score-realism): Does the generated data have the shape of a REAL sample? Compares column kinds, blank rates, variety and magnitudes, never values. Pass the sample's path on this machine, not its contents. Whether the data follows its recipe is prove_recipe.
- [Tool directory](https://theworklens.com/docs/mcp/tools): All 13 tools, grouped by step.

## Related

- [Tool directory](https://theworklens.com/docs/mcp/tools): All 13 tools the WorkLens MCP server exposes, grouped by the step they belong to, generated from the published contracts.
- [prove_recipe](https://theworklens.com/docs/mcp/tools/prove-recipe): Return the full proof for a recipe as DATA (schema worklens.proof.v2): consistency, privacy, independent property verification and a tamper-evident receipt,…
- [verify_world](https://theworklens.com/docs/mcp/tools/verify-world): Check that a company file and the job files pointing at it still agree. Each job file is validated ALONE, so the two facts it cannot know go unchecked: how…
- [score_realism](https://theworklens.com/docs/mcp/tools/score-realism): Does the generated data have the shape of a REAL sample? Compares column kinds, blank rates, variety and magnitudes, never values. Pass the sample's path on…

_← Previous: [prove_recipe](https://theworklens.com/docs/mcp/tools/prove-recipe) · Next: [CLI](https://theworklens.com/docs/cli) →_

_README, input schema and the primary worked request and response for this tool, published with the server. Source: mcp-schemas/tools/13-check_privacy._

_Canonical: https://theworklens.com/docs/mcp/tools/check-privacy · This copy: https://theworklens.com/docs/mcp/tools/check-privacy.md_
