Yichus / Reference / API MCP tools

api_dist_check

Run DistEngine on a declared Yichus/Dist DistSpec (multi-instance schedules, lost updates).

Kind: DistCheck. Family concurrency: MCP servers list it once api_tools opens that family. Origin: Yichus/Mcp::catalog.

CLI: yichus dist — the same distributed-world simulation with the same depth and schedule bounds.

Parameters

Examples

Each response was produced by calling this tool with the displayed request when these docs were generated, on files committed to the repository. A violated or refuted verdict is a successful call: the check ran and found what its example shows.

A counter that holds under every schedule (lost-update task, reference solution)

Request

{
  "sources": [
    {
      "fileName": "protocol.bosatsu",
      "source": "package Bench/Dist002/Protocol\n\n# GIVEN — the wire protocol for task 002. Probes must not modify this file.\n#\n# A tiny key-less versioned store protocol: read the counter, write it\n# blind, or compare-and-swap against the version you read.\n\nfrom Yichus/Dist import Send\n\n# Send(to, msg): first field is the DESTINATION node name, second the payload.\n\nexport (Msg(), AppStep())\n\nexposes (Yichus/Dist)\n\nenum Msg:\n  Get\n  GotValue(value: Int, version: Int)\n  Put(value: Int)\n  Cas(expected_version: Int, value: Int)\n  CasOk(version: Int)\n  CasFailed(value: Int, version: Int)\n\n# What one app-server activation produces: the app's next state and the\n# messages it emits.\nstruct AppStep[t](state: t, sends: List[Send[Msg]])\n"
    },
    {
      "fileName": "checker.bosatsu",
      "source": "package Bench/Dist002/Checker\n\n# GIVEN — the world wiring and invariants for task 002. Probes must not\n# modify this file.\n#\n# The web-server-writes-to-a-db shape: a database node (fully specified\n# here — a versioned cell answering Get/Put/Cas) and TWO app servers\n# running the solution package's handler, each trying to add exactly one\n# to the shared counter. The fault budget is ZERO: no drops, no\n# duplicates, no crashes. The only adversary is delivery interleaving —\n# which is already enough to lose an update if the apps write blindly.\n\nfrom Yichus/Dist import (\n  Send, Step, Node, World, NodeView, Invariant, FinalInvariant, FaultBudget, DistSpec\n)\nfrom Bench/Dist002/Protocol import (\n  Msg, Get, GotValue, Put, Cas, CasOk, CasFailed, AppStep\n)\nfrom Bench/Dist002/Solution import AState, app_init, app_start, app_step, describe_app\n\nexport (world, WState())\n\nexposes (Bench/Dist002/Protocol, Bench/Dist002/Solution, Yichus/Dist)\n\nenum WState:\n  DbS(value: Int, version: Int, bad_write: Bool)\n  AppS(inner: AState)\n\n# --- the database node (given, versioned cell) -----------------------\n\ndef db_start(s: WState) -> Step[WState, Msg]:\n  Step(s, [])\n\n# Every write is audited: a committed value that is not exactly the\n# previous value + 1 latches bad_write. This is what makes the task\n# ungameable by hardcoding (Put(2) from cold trips it) and is pure\n# modeling — the audit lives in the db node's own state, not the engine.\ndef audit(previous: Int, v: Int, bad: Bool) -> Bool:\n  match bad:\n    case True: True\n    case False:\n      match eq_Int(v, add(previous, 1)):\n        case True: False\n        case False: True\n\ndef db_on_message(s: WState, sender: String, m: Msg) -> Step[WState, Msg]:\n  match s:\n    case DbS(value, version, bad):\n      match m:\n        case Get: Step(s, [Send(sender, GotValue(value, version))])\n        case Put(v): Step(DbS(v, add(version, 1), audit(value, v, bad)), [])\n        case Cas(expected, v):\n          match eq_Int(expected, version):\n            case True:\n              Step(\n                DbS(v, add(version, 1), audit(value, v, bad)),\n                [Send(sender, CasOk(add(version, 1)))]\n              )\n            case False:\n              Step(s, [Send(sender, CasFailed(value, version))])\n        case GotValue(_, _): Step(s, [])\n        case CasOk(_): Step(s, [])\n        case CasFailed(_, _): Step(s, [])\n    case AppS(_): Step(s, [])\n\n# --- the app nodes (adapters over the solution package) --------------\n\ndef app_start_adapter(s: WState) -> Step[WState, Msg]:\n  match s:\n    case AppS(inner):\n      match app_start(inner):\n        case AppStep(inner2, sends): Step(AppS(inner2), sends)\n    case DbS(_, _, _): Step(s, [])\n\ndef app_on_message(s: WState, sender: String, m: Msg) -> Step[WState, Msg]:\n  match s:\n    case AppS(inner):\n      match app_step(inner, sender, m):\n        case AppStep(inner2, sends): Step(AppS(inner2), sends)\n    case DbS(_, _, _): Step(s, [])\n\n# --- invariants ------------------------------------------------------\n\ndef db_value(views: List[NodeView[WState]]) -> Int:\n  loop views:\n    case []: 0\n    case [NodeView(_, st), *rest]:\n      match st:\n        case DbS(value, _, _): value\n        case AppS(_): db_value(rest)\n\ndef db_clean(views: List[NodeView[WState]]) -> Bool:\n  loop views:\n    case []: True\n    case [NodeView(_, st), *rest]:\n      match st:\n        case DbS(_, _, bad):\n          match bad:\n            case True: False\n            case False: True\n        case AppS(_): db_clean(rest)\n\n# Safety: two apps each adding one can never push the counter past two.\ndef never_overcounted(views: List[NodeView[WState]]) -> Bool:\n  match cmp_Int(db_value(views), 2):\n    case GT: False\n    case _: True\n\n# Convergence: when the network settles, BOTH increments are in the\n# counter. The blind read-modify-write loses one under interleaving.\ndef both_counted(views: List[NodeView[WState]]) -> Bool:\n  eq_Int(db_value(views), 2)\n\ndef describe_state(s: WState) -> String:\n  match s:\n    case DbS(value, version, _):\n      concat_String([\"db(v=\", int_to_String(value), \",ver=\", int_to_String(version), \")\"])\n    case AppS(inner): describe_app(inner)\n\ndef describe_msg(m: Msg) -> String:\n  match m:\n    case Get: \"Get\"\n    case GotValue(v, ver):\n      concat_String([\"GotValue(\", int_to_String(v), \",ver=\", int_to_String(ver), \")\"])\n    case Put(v): concat_String([\"Put(\", int_to_String(v), \")\"])\n    case Cas(ver, v):\n      concat_String([\"Cas(expect=\", int_to_String(ver), \",\", int_to_String(v), \")\"])\n    case CasOk(ver): concat_String([\"CasOk(ver=\", int_to_String(ver), \")\"])\n    case CasFailed(v, ver):\n      concat_String([\"CasFailed(\", int_to_String(v), \",ver=\", int_to_String(ver), \")\"])\n\nworld = DistSpec(\n  World([\n    Node(\"db\", DbS(0, 0, False), db_start, db_on_message),\n    Node(\"app1\", AppS(app_init), app_start_adapter, app_on_message),\n    Node(\"app2\", AppS(app_init), app_start_adapter, app_on_message)\n  ]),\n  FaultBudget(0, 0, 0),\n  [\n    Invariant(\"never-overcounted\", never_overcounted),\n    Invariant(\"writes-are-increments\", db_clean)\n  ],\n  [FinalInvariant(\"both-counted\", both_counted)],\n  describe_state,\n  describe_msg\n)\n"
    },
    {
      "fileName": "solution.bosatsu",
      "source": "package Bench/Dist002/Solution\n\n# ANSWER KEY — the reference solution for task 002. Proves the task is\n# solvable; probes never see this file. Optimistic concurrency: read,\n# compare-and-swap against the version read, retry from the failure's\n# fresh (value, version) until the increment lands.\n\nfrom Yichus/Dist import Send\nfrom Bench/Dist002/Protocol import (\n  Msg, Get, GotValue, Put, Cas, CasOk, CasFailed, AppStep\n)\n\nexport (AState(), app_init, app_start, app_step, describe_app)\n\nexposes (Bench/Dist002/Protocol)\n\nenum AState:\n  Starting\n  Waiting\n  Finished\n\napp_init = Starting\n\ndef app_start(s: AState) -> AppStep[AState]:\n  match s:\n    case Starting: AppStep(Waiting, [Send(\"db\", Get)])\n    case Waiting: AppStep(s, [])\n    case Finished: AppStep(s, [])\n\ndef app_step(s: AState, _: String, m: Msg) -> AppStep[AState]:\n  match s:\n    case Waiting:\n      match m:\n        case GotValue(v, ver): AppStep(s, [Send(\"db\", Cas(ver, add(v, 1)))])\n        # A CasFailed carries the store's fresh value and version, so the\n        # retry needs no second Get.\n        case CasFailed(v, ver): AppStep(s, [Send(\"db\", Cas(ver, add(v, 1)))])\n        case CasOk(_): AppStep(Finished, [])\n        case Get: AppStep(s, [])\n        case Put(_): AppStep(s, [])\n        case Cas(_, _): AppStep(s, [])\n    case Starting: AppStep(s, [])\n    case Finished: AppStep(s, [])\n\ndef describe_app(s: AState) -> String:\n  match s:\n    case Starting: \"app(starting)\"\n    case Waiting: \"app(waiting)\"\n    case Finished: \"app(done)\"\n"
    }
  ]
}

Response

{
  "ok": true,
  "tool": "api_dist_check",
  "artifactClass": "dist-verdict",
  "schemaVersion": "dist-1.0",
  "sources": {
    "hash": "77247d944bb666ef09e4ccd8885a8ab939a8b370034bfde3e6de6d1c93893b58",
    "files": [
      {
        "name": "protocol",
        "sha256": "1724a9ab5f60f874b7b1cb330a0a01890e8774cd0b978c973c27d90a0eaa0c98"
      },
      {
        "name": "checker",
        "sha256": "aa0b802c02262b0ad9bffa5aae6d2443001c64fc3d9675f9702a8e7b50c02151"
      },
      {
        "name": "solution",
        "sha256": "61a4bb3b149496a12a2020671c5aa6fd523ed83b97139f967bc5d045351e3fd3"
      }
    ]
  },
  "specs": [
    {
      "spec": "Bench/Dist002/Checker::world",
      "location": "checker:132:9",
      "nodes": [
        "db",
        "app1",
        "app2"
      ],
      "exploredSchedules": 106,
      "complete": true,
      "quiescentSchedules": 106,
      "randomRuns": 0,
      "supervisionLinks": 0,
      "verdicts": [
        {
          "invariant": "never-overcounted",
          "kind": "invariant",
          "verdict": "holds",
          "detail": "106 schedule(s) explored exhaustively, every state satisfied 'never-overcounted'",
          "seed": null,
          "counterexample": []
        },
        {
          "invariant": "writes-are-increments",
          "kind": "invariant",
          "verdict": "holds",
          "detail": "106 schedule(s) explored exhaustively, every state satisfied 'writes-are-increments'",
          "seed": null,
          "counterexample": []
        },
        {
          "invariant": "both-counted",
          "kind": "final",
          "verdict": "holds",
          "detail": "106 schedule(s) explored exhaustively, every schedule reached quiescence, every quiescent state satisfied 'both-counted'",
          "seed": null,
          "counterexample": []
        }
      ]
    }
  ]
}

The near-miss twin: a blind write loses an update

Request

{
  "sources": [
    {
      "fileName": "protocol.bosatsu",
      "source": "package Bench/Dist002/Protocol\n\n# GIVEN — the wire protocol for task 002. Probes must not modify this file.\n#\n# A tiny key-less versioned store protocol: read the counter, write it\n# blind, or compare-and-swap against the version you read.\n\nfrom Yichus/Dist import Send\n\n# Send(to, msg): first field is the DESTINATION node name, second the payload.\n\nexport (Msg(), AppStep())\n\nexposes (Yichus/Dist)\n\nenum Msg:\n  Get\n  GotValue(value: Int, version: Int)\n  Put(value: Int)\n  Cas(expected_version: Int, value: Int)\n  CasOk(version: Int)\n  CasFailed(value: Int, version: Int)\n\n# What one app-server activation produces: the app's next state and the\n# messages it emits.\nstruct AppStep[t](state: t, sends: List[Send[Msg]])\n"
    },
    {
      "fileName": "checker.bosatsu",
      "source": "package Bench/Dist002/Checker\n\n# GIVEN — the world wiring and invariants for task 002. Probes must not\n# modify this file.\n#\n# The web-server-writes-to-a-db shape: a database node (fully specified\n# here — a versioned cell answering Get/Put/Cas) and TWO app servers\n# running the solution package's handler, each trying to add exactly one\n# to the shared counter. The fault budget is ZERO: no drops, no\n# duplicates, no crashes. The only adversary is delivery interleaving —\n# which is already enough to lose an update if the apps write blindly.\n\nfrom Yichus/Dist import (\n  Send, Step, Node, World, NodeView, Invariant, FinalInvariant, FaultBudget, DistSpec\n)\nfrom Bench/Dist002/Protocol import (\n  Msg, Get, GotValue, Put, Cas, CasOk, CasFailed, AppStep\n)\nfrom Bench/Dist002/Solution import AState, app_init, app_start, app_step, describe_app\n\nexport (world, WState())\n\nexposes (Bench/Dist002/Protocol, Bench/Dist002/Solution, Yichus/Dist)\n\nenum WState:\n  DbS(value: Int, version: Int, bad_write: Bool)\n  AppS(inner: AState)\n\n# --- the database node (given, versioned cell) -----------------------\n\ndef db_start(s: WState) -> Step[WState, Msg]:\n  Step(s, [])\n\n# Every write is audited: a committed value that is not exactly the\n# previous value + 1 latches bad_write. This is what makes the task\n# ungameable by hardcoding (Put(2) from cold trips it) and is pure\n# modeling — the audit lives in the db node's own state, not the engine.\ndef audit(previous: Int, v: Int, bad: Bool) -> Bool:\n  match bad:\n    case True: True\n    case False:\n      match eq_Int(v, add(previous, 1)):\n        case True: False\n        case False: True\n\ndef db_on_message(s: WState, sender: String, m: Msg) -> Step[WState, Msg]:\n  match s:\n    case DbS(value, version, bad):\n      match m:\n        case Get: Step(s, [Send(sender, GotValue(value, version))])\n        case Put(v): Step(DbS(v, add(version, 1), audit(value, v, bad)), [])\n        case Cas(expected, v):\n          match eq_Int(expected, version):\n            case True:\n              Step(\n                DbS(v, add(version, 1), audit(value, v, bad)),\n                [Send(sender, CasOk(add(version, 1)))]\n              )\n            case False:\n              Step(s, [Send(sender, CasFailed(value, version))])\n        case GotValue(_, _): Step(s, [])\n        case CasOk(_): Step(s, [])\n        case CasFailed(_, _): Step(s, [])\n    case AppS(_): Step(s, [])\n\n# --- the app nodes (adapters over the solution package) --------------\n\ndef app_start_adapter(s: WState) -> Step[WState, Msg]:\n  match s:\n    case AppS(inner):\n      match app_start(inner):\n        case AppStep(inner2, sends): Step(AppS(inner2), sends)\n    case DbS(_, _, _): Step(s, [])\n\ndef app_on_message(s: WState, sender: String, m: Msg) -> Step[WState, Msg]:\n  match s:\n    case AppS(inner):\n      match app_step(inner, sender, m):\n        case AppStep(inner2, sends): Step(AppS(inner2), sends)\n    case DbS(_, _, _): Step(s, [])\n\n# --- invariants ------------------------------------------------------\n\ndef db_value(views: List[NodeView[WState]]) -> Int:\n  loop views:\n    case []: 0\n    case [NodeView(_, st), *rest]:\n      match st:\n        case DbS(value, _, _): value\n        case AppS(_): db_value(rest)\n\ndef db_clean(views: List[NodeView[WState]]) -> Bool:\n  loop views:\n    case []: True\n    case [NodeView(_, st), *rest]:\n      match st:\n        case DbS(_, _, bad):\n          match bad:\n            case True: False\n            case False: True\n        case AppS(_): db_clean(rest)\n\n# Safety: two apps each adding one can never push the counter past two.\ndef never_overcounted(views: List[NodeView[WState]]) -> Bool:\n  match cmp_Int(db_value(views), 2):\n    case GT: False\n    case _: True\n\n# Convergence: when the network settles, BOTH increments are in the\n# counter. The blind read-modify-write loses one under interleaving.\ndef both_counted(views: List[NodeView[WState]]) -> Bool:\n  eq_Int(db_value(views), 2)\n\ndef describe_state(s: WState) -> String:\n  match s:\n    case DbS(value, version, _):\n      concat_String([\"db(v=\", int_to_String(value), \",ver=\", int_to_String(version), \")\"])\n    case AppS(inner): describe_app(inner)\n\ndef describe_msg(m: Msg) -> String:\n  match m:\n    case Get: \"Get\"\n    case GotValue(v, ver):\n      concat_String([\"GotValue(\", int_to_String(v), \",ver=\", int_to_String(ver), \")\"])\n    case Put(v): concat_String([\"Put(\", int_to_String(v), \")\"])\n    case Cas(ver, v):\n      concat_String([\"Cas(expect=\", int_to_String(ver), \",\", int_to_String(v), \")\"])\n    case CasOk(ver): concat_String([\"CasOk(ver=\", int_to_String(ver), \")\"])\n    case CasFailed(v, ver):\n      concat_String([\"CasFailed(\", int_to_String(v), \",ver=\", int_to_String(ver), \")\"])\n\nworld = DistSpec(\n  World([\n    Node(\"db\", DbS(0, 0, False), db_start, db_on_message),\n    Node(\"app1\", AppS(app_init), app_start_adapter, app_on_message),\n    Node(\"app2\", AppS(app_init), app_start_adapter, app_on_message)\n  ]),\n  FaultBudget(0, 0, 0),\n  [\n    Invariant(\"never-overcounted\", never_overcounted),\n    Invariant(\"writes-are-increments\", db_clean)\n  ],\n  [FinalInvariant(\"both-counted\", both_counted)],\n  describe_state,\n  describe_msg\n)\n"
    },
    {
      "fileName": "broken-blind-write.bosatsu",
      "source": "package Bench/Dist002/Solution\n\n# HARNESS SANITY — the blind read-modify-write app server: read the\n# counter, add one, Put the sum back. Under the interleaving where both\n# apps read before either writes, one increment is lost — the checker\n# must report both-counted violated with that schedule as the trace.\n# No faults are needed to break this; delivery order alone does it.\n\nfrom Yichus/Dist import Send\nfrom Bench/Dist002/Protocol import (\n  Msg, Get, GotValue, Put, Cas, CasOk, CasFailed, AppStep\n)\n\nexport (AState(), app_init, app_start, app_step, describe_app)\n\nexposes (Bench/Dist002/Protocol)\n\nenum AState:\n  Starting\n  Waiting\n  Finished\n\napp_init = Starting\n\ndef app_start(s: AState) -> AppStep[AState]:\n  match s:\n    case Starting: AppStep(Waiting, [Send(\"db\", Get)])\n    case Waiting: AppStep(s, [])\n    case Finished: AppStep(s, [])\n\ndef app_step(s: AState, _: String, m: Msg) -> AppStep[AState]:\n  match s:\n    case Waiting:\n      match m:\n        case GotValue(v, _): AppStep(Finished, [Send(\"db\", Put(add(v, 1)))])\n        case CasFailed(_, _): AppStep(s, [])\n        case CasOk(_): AppStep(s, [])\n        case Get: AppStep(s, [])\n        case Put(_): AppStep(s, [])\n        case Cas(_, _): AppStep(s, [])\n    case Starting: AppStep(s, [])\n    case Finished: AppStep(s, [])\n\ndef describe_app(s: AState) -> String:\n  match s:\n    case Starting: \"app(starting)\"\n    case Waiting: \"app(waiting)\"\n    case Finished: \"app(done)\"\n"
    }
  ]
}

Response

{
  "ok": true,
  "tool": "api_dist_check",
  "artifactClass": "dist-verdict",
  "schemaVersion": "dist-1.0",
  "sources": {
    "hash": "b0f4782eca1449c6a1284113e4a8191811c9692255bb6be3ad0297b10b887297",
    "files": [
      {
        "name": "protocol",
        "sha256": "1724a9ab5f60f874b7b1cb330a0a01890e8774cd0b978c973c27d90a0eaa0c98"
      },
      {
        "name": "checker",
        "sha256": "aa0b802c02262b0ad9bffa5aae6d2443001c64fc3d9675f9702a8e7b50c02151"
      },
      {
        "name": "broken_blind_write",
        "sha256": "7c3d874a6c93de2df063e9a86800146e1e7573af3e613048520114f60c79f25f"
      }
    ]
  },
  "specs": [
    {
      "spec": "Bench/Dist002/Checker::world",
      "location": "checker:132:9",
      "nodes": [
        "db",
        "app1",
        "app2"
      ],
      "exploredSchedules": 20,
      "complete": true,
      "quiescentSchedules": 20,
      "randomRuns": 0,
      "supervisionLinks": 0,
      "verdicts": [
        {
          "invariant": "never-overcounted",
          "kind": "invariant",
          "verdict": "holds",
          "detail": "20 schedule(s) explored exhaustively, every state satisfied 'never-overcounted'",
          "seed": null,
          "counterexample": []
        },
        {
          "invariant": "writes-are-increments",
          "kind": "invariant",
          "verdict": "violated",
          "detail": "'writes-are-increments' violated after deliver app2 -> db",
          "seed": null,
          "counterexample": [
            {
              "step": 1,
              "kind": "deliver",
              "from": "app1",
              "to": "db",
              "msg": "Get",
              "emittedAt": 0,
              "alt": null,
              "states": {
                "db": "db(v=0,ver=0)",
                "app1": "app(waiting)",
                "app2": "app(waiting)"
              }
            },
            {
              "step": 2,
              "kind": "deliver",
              "from": "app2",
              "to": "db",
              "msg": "Get",
              "emittedAt": 0,
              "alt": null,
              "states": {
                "db": "db(v=0,ver=0)",
                "app1": "app(waiting)",
                "app2": "app(waiting)"
              }
            },
            {
              "step": 3,
              "kind": "deliver",
              "from": "db",
              "to": "app1",
              "msg": "GotValue(0,ver=0)",
              "emittedAt": 1,
              "alt": null,
              "states": {
                "db": "db(v=0,ver=0)",
                "app1": "app(done)",
                "app2": "app(waiting)"
              }
            },
            {
              "step": 4,
              "kind": "deliver",
              "from": "db",
              "to": "app2",
              "msg": "GotValue(0,ver=0)",
              "emittedAt": 2,
              "alt": null,
              "states": {
                "db": "db(v=0,ver=0)",
                "app1": "app(done)",
                "app2": "app(done)"
              }
            },
            {
              "step": 5,
              "kind": "deliver",
              "from": "app1",
              "to": "db",
              "msg": "Put(1)",
              "emittedAt": 3,
              "alt": null,
              "states": {
                "db": "db(v=1,ver=1)",
                "app1": "app(done)",
                "app2": "app(done)"
              }
            },
            {
              "step": 6,
              "kind": "deliver",
              "from": "app2",
              "to": "db",
              "msg": "Put(1)",
              "emittedAt": 4,
              "alt": null,
              "states": {
                "db": "db(v=1,ver=2)",
                "app1": "app(done)",
                "app2": "app(done)"
              }
            }
          ]
        },
        {
          "invariant": "both-counted",
          "kind": "final",
          "verdict": "violated",
          "detail": "'both-counted' violated in a quiescent state",
          "seed": null,
          "counterexample": [
            {
              "step": 1,
              "kind": "deliver",
              "from": "app1",
              "to": "db",
              "msg": "Get",
              "emittedAt": 0,
              "alt": null,
              "states": {
                "db": "db(v=0,ver=0)",
                "app1": "app(waiting)",
                "app2": "app(waiting)"
              }
            },
            {
              "step": 2,
              "kind": "deliver",
              "from": "app2",
              "to": "db",
              "msg": "Get",
              "emittedAt": 0,
              "alt": null,
              "states": {
                "db": "db(v=0,ver=0)",
                "app1": "app(waiting)",
                "app2": "app(waiting)"
              }
            },
            {
              "step": 3,
              "kind": "deliver",
              "from": "db",
              "to": "app1",
              "msg": "GotValue(0,ver=0)",
              "emittedAt": 1,
              "alt": null,
              "states": {
                "db": "db(v=0,ver=0)",
                "app1": "app(done)",
                "app2": "app(waiting)"
              }
            },
            {
              "step": 4,
              "kind": "deliver",
              "from": "db",
              "to": "app2",
              "msg": "GotValue(0,ver=0)",
              "emittedAt": 2,
              "alt": null,
              "states": {
                "db": "db(v=0,ver=0)",
                "app1": "app(done)",
                "app2": "app(done)"
              }
            },
            {
              "step": 5,
              "kind": "deliver",
              "from": "app1",
              "to": "db",
              "msg": "Put(1)",
              "emittedAt": 3,
              "alt": null,
              "states": {
                "db": "db(v=1,ver=1)",
                "app1": "app(done)",
                "app2": "app(done)"
              }
            },
            {
              "step": 6,
              "kind": "deliver",
              "from": "app2",
              "to": "db",
              "msg": "Put(1)",
              "emittedAt": 4,
              "alt": null,
              "states": {
                "db": "db(v=1,ver=2)",
                "app1": "app(done)",
                "app2": "app(done)"
              }
            }
          ]
        }
      ]
    }
  ]
}

Run tools in the browser: api-mcp.html?webmcp=1.

Read the result according to this tool’s scope: static checks, bounded execution checks, and descriptive diagrams answer different questions. A successful call is not a general approval of the program. The safety and permissions guide compares the checks and provides editable ownership, guard, and role examples.