Yichus / Reference / API MCP tools

api_composition_diff

Compare two complete Bosatsu source sets through the shared source-composition-diff reader (source-composition-diff-read-4). Start with an overview read: its first page carries a compact gist (added, removed and changed packages, added/removed/changed definitions with signatures before and after where they changed, new and removed cross-package references, definitions that started or stopped referencing themselves, packages that gained or lost an imported package or import item and those whose declared import set is unchanged, declared service routes added, removed or changed by service and path with their handler, required roles, table permissions and rate limits, channel limits) and states every supplied package added, removed, changed or unchanged with its import changes when it fits the response cap; an oversized overview explicitly marks its summary partial and offers a snapshot-bound {scope: "packages"} cursor for every package row. A reference that only moved within its body is one moved event. Then open a returned exact event id with a witness read. Both sides compile through the Yichus kernel. Every result retains before and after snapshots, channel availability, and bounded changes. This structure-only path currently reports the effect channel unavailable; it does not silently equate absent effect events with unchanged effects. A package supplied on only one side is reported added or removed relative to the supplied source sets, with its definitions, imports and relations as events; the tool cannot know about files the caller did not supply. A source set that fails compilation fails the call; it is never read as removed definitions. Checked variant type events retain constructor order and field signatures, and variant-use events compare grouped checked counts by exact type, constructor, owner, use kind and location precision. Variant type declarations in packages supplied on only one side are source-set additions or removals. When package sets differ, variant-use counts are partial over shared supplied owner packages or unavailable without overlap; an unmatched type does not become a false use removal. A composition diff describes checked source structure, not behavioral equivalence or whether a proposed change is desirable. The same request works with yichus organize composition-diff --read request.json --before ... --after ... and browser WebMCP.

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

CLI: yichus organize composition-diff — the same source-backed composition diff and bounded overview/witness reader across CLI, local MCP, and browser WebMCP.

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.