Foreign key claim check

foreign-key-claim-check · version 1.0.0 · Numbers & math · free, no key needed

Check an exact referential-inclusion claim and first violation under an explicit composite-null policy.

Use when you need to: check claimed foreign key · validate referential inclusion certificate · verify first foreign key violation.

Decide before calling

Read the versioned contract and the supported scope below. Reuse foreign-key-claim-check@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use foreign-key-claim-check@1.0.0 for check claimed foreign key. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "child_rows": [
    {
      "pid": 1
    }
  ],
  "parent_rows": [
    {
      "id": 1
    }
  ],
  "child_columns": [
    "pid"
  ],
  "parent_columns": [
    "id"
  ],
  "null_policy": "match_simple",
  "claim": {
    "satisfied": true,
    "first_violation_index": null
  }
}

Response:

{
  "result": {
    "valid": true,
    "reason": "claim_exact",
    "discrepancy": null,
    "reference_version": "ISO/IEC 9075-2:2023 §4.18, §11.8, §11.9 (narrowed profile)"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "foreign-key-claim-check",
  "version": "1.0.0",
  "input": {
    "child_rows": [
      {
        "pid": 1
      }
    ],
    "parent_rows": [
      {
        "id": 1
      }
    ],
    "child_columns": [
      "pid"
    ],
    "parent_columns": [
      "id"
    ],
    "null_policy": "match_simple",
    "claim": {
      "satisfied": true,
      "first_violation_index": null
    }
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/foreign-key-claim-check/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"child_rows":[{"pid":1}],"parent_rows":[{"id":1}],"child_columns":["pid"],"parent_columns":["id"],"null_policy":"match_simple","claim":{"satisfied":true,"first_violation_index":null}}'

The machine-readable contract is at /v1/tools/foreign-key-claim-check/versions/1.0.0.

CLI

node cli.mjs run foreign-key-claim-check 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.