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

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

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.

## The picture

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

## Inputs

- schema (string, required) — The recipe as a JSON string.
- original_path (string, required) — Path to a real sample (csv, xlsx, json or xml), absolute or relative to the server. Read locally; its values never enter the reply.
- entity (string) — The generated table the sample corresponds to. Default: the first.
- n_rows (number) — see the input schema
- seed (number | string) — As in generate_from_graph.
- scenario (string) — see the input schema

## When to call it

Realism is the one question a recipe cannot answer about itself: does the generated data have the shape of the real thing? Column kinds, blank rates, variety and magnitudes are compared on value-free profiles.

The sample is named by path and read on this machine. Its values never enter the conversation or the reply - only counts and the file's name do.

Whether the data follows its own recipe is a different question, answered by prove_recipe, whose passed gate checks every rule on every value. (Until 2026-09-17 this tool answered that one, by averaging.)

## Example request

```json
{
  "_comment": "Twenty invoices compared with the shape of an eight-row sample on disk - its path is sent, never its values.",
  "name": "score_realism",
  "arguments": {
    "schema": {
      "pack_manifest": {
        "name": "au-invoice",
        "version": "1.0.0",
        "provides": [
          "domain:au-invoice"
        ],
        "owner": "worklens"
      },
      "project": "au-invoice",
      "region": "AU",
      "entities": [
        {
          "name": "invoice",
          "rows": 50,
          "fields": [
            {
              "name": "invoice_id",
              "type": "id",
              "unique": true
            },
            {
              "name": "abn",
              "type_def": {
                "pattern": "N##########",
                "checksum": {
                  "algorithm": "weighted_mod",
                  "weights": [
                    10,
                    1,
                    3,
                    5,
                    7,
                    9,
                    11,
                    13,
                    15,
                    17,
                    19
                  ],
                  "modulus": 89,
                  "check_digit": "last",
                  "remainder_from": "zero",
                  "first_digit_offset": -1
                },
                "display": "## ### ### ###",
                "defects": {
                  "invalid": {
                    "at": 1,
                    "replace_with": "0",
                    "breaks": "checksum",
                    "note": "One digit off, so the mod-89 sum fails. Declared here rather than written into the engine."
                  }
                }
              },
              "sensitivity": "pii"
            },
            {
              "name": "customer_name",
              "type": "person.fullName",
              "sensitivity": "pii"
            },
            {
              "name": "billing_address",
              "type": "address.full",
              "sensitivity": "pii"
            },
            {
              "name": "issue_date",
              "type": "date"
            },
            {
              "name": "subtotal",
              "type": "finance.amount",
              "min": 50,
              "max": 5000
            },
            {
              "name": "gst",
              "type": "finance.amount",
          
```

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

## Example response

```json
{
  "contract_version": 3,
  "overall": 97,
  "values_checked": 9,
  "metrics": [
    {
      "label": "Types preserved",
      "status": "red",
      "detail": "8 of 9 — columns kept their original kind",
      "pass_rate": 0.8888888888888888,
      "checked": 9
    },
    {
      "label": "Null-rate matches",
      "status": "green",
      "detail": "9 of 9 — blank rates close to the original",
      "pass_rate": 1,
      "checked": 9
    },
    {
      "label": "Cardinality preserved",
      "status": "green",
      "detail": "9 of 9 — value variety close to the original",
      "pass_rate": 1,
      "checked": 9
    },
    {
      "label": "Distribution similar",
      "status": "green",
      "detail": "3 of 3 — numeric ranges resemble the original",
      "pass_rate": 1,
      "checked": 3
    }
  ],
  "compared_with": {
    "file": "invoices.csv",
    "format": "csv",
    "bytes": 1050
  }
}
```

## 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…
- [check_privacy](https://theworklens.com/docs/mcp/tools/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 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…
- [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…
- [check_privacy](https://theworklens.com/docs/mcp/tools/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…

_← Previous: [generate_synthetic_data](https://theworklens.com/docs/mcp/tools/generate-synthetic-data) · Next: [verify_world](https://theworklens.com/docs/mcp/tools/verify-world) →_

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

_Canonical: https://theworklens.com/docs/mcp/tools/score-realism · This copy: https://theworklens.com/docs/mcp/tools/score-realism.md_
