Yichus / Reference / API MCP tools
api_add_artifact
Return a paste-ready Bosatsu snippet for a report artifact (AccessSpec, ServiceDef, DistSpec, EscrowSpec, FlowSpec, Spec, FrontendSpec). Pass kind. Pass the same sources as api_report to fill names from the IR, or omit sources for a generic template. If the kind does not apply to those sources, the tool says so instead of emitting a misleading snippet.
Kind: AddArtifact. Origin: Yichus/Mcp::catalog.
CLI: none — a declaration snippet (access, service, dist, escrow, flow, spec, frontend) for an editor; use `yichus call` to return snippets.
Parameters
kind(required, string) — access, service, dist, escrow, flow, spec, or frontendsources(optional, array) — Optional JSON array of {fileName, source}. When present, the snippet is filled from the typed IR.resource(optional, string) — Optional table or cell name for generic access/escrow/spec templates.policy(optional, string) — owner or public. Used for generic access templates.name(optional, string) — Optional binding/service name for generic templates.
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.