Adapter Prepare, Confirm, and Execute

Adapter Prepare, Confirm, and Execute A workflow diagram generated by Archify. 01 / MCP Caller 02 / MCP Adapter 03 / Human / Agent Decision Prepare Confirm Execute Initial Call · confirm=false · MCP Caller › Prepare Initial Call confirm=false Prepare · IDs · email/access · MCP Adapter › Prepare Prepare IDs · email/access Return Preview · no write · call ends · MCP Caller › Prepare Return Preview no write · call ends Review · human delay · Human / Agent Decision › Confirm · no lease Review human delay no lease Confirm Call · IDs · confirm=true · MCP Caller › Execute Confirm Call IDs · confirm=true Execute Once · fresh client access · MCP Adapter › Execute · canonical operands Execute Once fresh client access canonical operands needs_confirmation new invocation Legend Agent logic Policy External system

Safety Contract

  • • Resource deletes resolve their canonical ID operands
  • • Sharing keeps a canonical notebook ID plus email/access operands
  • • Preview sends no mutation; the confirmed call holds no cross-delay lease

Covered Mutations

  • • notebook_delete · source_delete · studio_delete
  • • share_remove_user · share_set_user · public widening

Code Evidence

  • • Repository: https://github.com/teng-lin/notebooklm-py
  • • Revision: 719378b8af7023b8eca0c33d2de6d44d35db3434
  • • mcp/_confirm.py:45 and tools/notebooks.py:155 — canonical preview
  • • tools/sources.py:403, studio.py:782, sharing.py:86 — gated tools