GenAI.Approval.MCP.SubmitApprovalScript (GenAI Approval v0.1.0)

Copy Markdown View Source

The v1 interop surface (PRD §10): a standard MCP tool any client can call to submit an approval script. Register it on a Noizu.MCP.Server:

tool GenAI.Approval.MCP.SubmitApprovalScript

and configure the host that maps submissions to runs:

config :genai_approval, :submit_host, MyApp.ApprovalHost

The tool loads the script (rejections return as a tool execution error with line/column details), asks the GenAI.Approval.SubmitHost for run options, starts the run, notifies the host (on_run/3 — mount your UI), then parks until the run terminates and returns the sanitized §9 result as structured content. Callers should use a generous or infinite per-call timeout, exactly like the MCP Inspector's parked calls.