Yichus / Reference / API MCP tools

api_tlc_check

Check the same protocol-case-1.0 case as api_protocol_check with pinned TLC 1.7.4 instead of the native scheduler: the compiled handlers are lowered to a TLA+ module (each transaction one atomic action with its committed, aborted, commit-unknown and retry-exhausted outcomes; request start, return and instance crash as separate actions), TLC explores every distinct state of the declared finite model, every required witness is checked in its own run, and a counterexample or a witness counts only after the native scheduler replays its trace to the same violation or witness. Status holds covers only the declared finite case (proven stays false); violated carries the replayed schedule; inconclusive names what was not lowered or not reached; disagreement means TLC and the native scheduler differ and is a defect (ok false). Host only: the pure engine and the browser answer errorKind host-not-configured; run yichus tlc --case case.json --tlc-jar tla2tools.jar files.bosatsu, or configure --tlc-host and --tlc-jar on yichus-api-mcp. The handler code is translated from its compiled IR; the transaction, fault and crash semantics are a TLA+ rendering of the same protocol model api_protocol_check explores, so a hold is TLC's result on that rendering; every counterexample and every witness trace is replayed by the native scheduler, and a trace it does not reproduce is a disagreement. The case's maxStates and maxOperations bound only the native check. Not lowered yet (inconclusive, with the reason): external calls, db_* effects outside a transaction, tx_new_token, IO[Bool] invariant predicates, the unique-return, unique-external and external-after-commit trace kinds, the sequence, external-count and predicate witness kinds, receipt keys from selectors other than request.<param>, and handler code outside the TLA+ grammar (recursion, loops, Char, Float64, Int64, non-ASCII Strings, Ints beyond 32 bits, and Predef functions other than add, sub, mul, eq_Int, cmp_Int, eq_String, concat_String, int_to_String and length_String).

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

CLI: yichus tlc — one implementation: both lower the case with TlaProtocol and run TlcProtocolCheck under pinned TLC 1.7.4, replaying any counterexample natively; the CLI reads the case from --case and the jar from --tlc-jar; npm MCP requires a configured --tlc-host and --tlc-jar; the pure engine and browser WebMCP answer host-not-configured.

Parameters

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.