Yichus / Reference / API MCP tools
api_flow
Check whether declared mutations follow their FlowSpec factory before shipping a family of similar handlers. report returns extracted named parts and located divergences; failed means a divergence or declaration error (the CLI exits 1). batch replays operations all-or-nothing in memory, never against a live store; admitted=false is a rejected batch, not a tool error. equivalence compares extracted composition with each mutation on seeded inputs: bounded observation, not proof; not-provable stays explicit and only refuted sets failed, as on the CLI. parts refuses any divergent mutation and returns Bosatsu source only after compiling it. Same engine and selection policy as yichus flow: batch and parts require exactly one selected flow; with no flow name any broken declaration fails selection, with a name unrelated broken declarations are returned as warnings.
Kind: Flow. Origin: Yichus/Mcp::catalog.
CLI: yichus flow — the same FlowEngine selection, JSON artifacts and divergence gates for report, batch, equivalence and parts; emitted parts are compiled on both surfaces, the CLI writes the source and the tool returns it.
Parameters
sources(required, array) — JSON array of {fileName, source}, including program and FlowSpec declarations.mode(optional, string) — report (default, every declaration), batch, equivalence, or parts.flow(optional, string) — Declared flow name for batch, equivalence or parts; report always covers every declaration.batch(optional, object) — For batch mode, JSON object (or encoded JSON) with operations: [{mutation: Pkg/Name/binding, input: ...}]. Pass exactly one of batch or ops.ops(optional, string) — For batch mode, a typed List[FlowOp[i, r]] binding as Pkg/Name/binding, instead of batch JSON.package_name(optional, string) — For parts mode, emitted package name (default the spec package followed by /Parts).seed(optional, integer) — Equivalence input seed (default 42).runs(optional, integer) — Positive number of equivalence inputs per mutation (default 5); zero or negative runs are rejected.
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.