Yichus / Reference / API MCP tools
api_workbook
Orient in a program, inspect binding contracts, or find what a proposed change can affect. Returns the same JSON artifacts as yichus workbook: package mode includes package summaries, a binding catalog and per-binding detail; impact mode follows reverse dependencies from a required binding; dossier mode follows the focus binding's dependencies. Omit binding in package or dossier mode for the whole program. Unknown or ambiguous focus names fail with candidates instead of silently broadening the answer.
Kind: Workbook. Origin: Yichus/Mcp::catalog.
CLI: yichus workbook — one implementation: WorkbookEngine assembles and renders package, impact and trace dossiers; the CLI writes JSON, the tool returns it.
Parameters
sources(required, array) — JSON array of {fileName, source} Bosatsu files.mode(optional, string) — package (default), impact, or dossier.binding(optional, string) — Focus: an unambiguous bare name or Pkg/Path/name. Required for impact mode.catalog_only(optional, boolean) — In package mode, omit per-binding detail while keeping package summaries and the catalog (default false). Ignored in other modes, as in the CLI.
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.