Approval Patterns for MCP Writes: Preview Diffs and Confirmation Tokens

Prevent accidental writes in MCP workflows with robust approval patterns. This deep dive covers multiple approval strategies: explicit yes/no confirmations, confirmation tokens, diff previews, and staged changes—with practical examples for create_task and update_task operations.

What This Guide Covers

This guide teaches you multiple approval patterns for safe write operations:

Approval Patterns

  • Explicit yes/no: Simple confirmation before writes
  • Confirmation token: Require specific token to proceed
  • Diff preview: Show what will change before applying
  • Staged changes: Build changes incrementally with review
  • Combined patterns: Mix patterns for maximum safety

Pattern 1: Explicit Yes/No Confirmation

The simplest pattern: ask for explicit confirmation before any write:

Create Task with Confirmation

"I want to create a task in Corcava: - Title: Implement user authentication - Project: [Project ID] - Due date: 2026-02-01 Show me what will be created, then wait for me to type 'YES' or 'CONFIRM' before actually creating it. If I don't confirm, don't create the task."

What the AI does:

  1. Shows preview of task details
  2. Waits for explicit "YES" or "CONFIRM"
  3. Only calls create_task after confirmation
  4. If no confirmation, does nothing

Update Task with Confirmation

"I want to update task [Task ID]: - Change status to 'in_progress' - Add assignee: [Name] Show me the current task details and what will change. Wait for me to type 'APPROVE' before making the update."

What the AI does:

  1. Calls get_task to show current state
  2. Shows what will change
  3. Waits for "APPROVE" confirmation
  4. Only calls update_task after approval

Pattern 2: Confirmation Token

Require a specific token to prevent accidental confirmations:

Token-Based Confirmation

"Create a task with these details: - Title: Review API documentation - Project: [Project ID] Show me a preview. To confirm, I must type the exact token: 'CREATE-TASK-2026'. If I don't type this exact token, don't create anything."

Benefits:

  • Prevents accidental "yes" responses
  • Requires intentional confirmation
  • Can use different tokens for different operations

Pattern 3: Diff Preview

Show exactly what will change before applying updates:

Update with Diff Preview

"Update task [Task ID]. Show me a diff of what will change: Current: - Status: open - Assignee: None - Due date: 2026-01-30 Proposed: - Status: in_progress - Assignee: John Doe - Due date: 2026-02-05 Show this diff clearly, then wait for my approval before applying."

What the AI does:

  1. Calls get_task to get current state
  2. Creates diff showing before/after
  3. Displays diff in readable format
  4. Waits for approval before calling update_task

Pattern 4: Staged Changes

Build changes incrementally with review at each stage:

Staged Update Process

"Let's update task [Task ID] in stages: Stage 1: Show me current task details Stage 2: Propose status change (show diff) Stage 3: After I approve status, propose assignee change (show diff) Stage 4: After I approve assignee, propose due date change (show diff) Stage 5: Apply all approved changes together Don't apply any changes until I've approved all stages."

Benefits:

  • Review each change individually
  • Can approve some changes, reject others
  • Final batch update after all approvals

Complete Examples

Example 1: Create Task (Full Pattern)

Complete Create Task Prompt

"I want to create a task in Corcava: - Title: Implement user authentication - Description: Add JWT-based authentication to the API - Project: [Project ID] - Due date: 2026-02-01 - Assignee: [Name] First, show me a preview of what will be created. Include all fields. Then wait for me to type the confirmation token 'CREATE-AUTH-TASK' before actually creating the task. If I don't type this exact token, don't create anything."

This pattern: Combines preview + confirmation token for maximum safety

Example 2: Update Task (Diff Pattern)

Complete Update Task Prompt

"Update task [Task ID]. Here's what I want to change: - Status: from 'open' to 'in_progress' - Assignee: from 'None' to 'Jane Smith' - Due date: from '2026-01-30' to '2026-02-05' First, get the current task details. Then show me a clear diff: - What's changing (before → after) - What's staying the same After showing the diff, wait for me to type 'APPROVE UPDATE' before making any changes. If I don't approve, don't update anything."

This pattern: Shows diff + requires explicit approval

Best Practices

Safety Recommendations

  • Always preview: Show what will change before applying
  • Use confirmation tokens: Require specific tokens for important operations
  • Show diffs: Make changes visible and clear
  • Batch carefully: For multiple changes, show all diffs before applying
  • Read before write: Always fetch current state before updating
  • Timeout handling: If no confirmation received, don't proceed

Combining Patterns

You can combine multiple patterns for maximum safety:

Combined Pattern Example

"Create a task with these details: - Title: [Title] - Project: [Project ID] 1. Show me a preview of what will be created 2. Show me a diff (empty → new task fields) 3. Wait for me to type the confirmation token 'CREATE-TASK-2026' 4. Only after I type the exact token, create the task 5. If I don't type the token, don't create anything"

This combines: Preview + Diff + Confirmation Token

Troubleshooting

AI Proceeds Without Confirmation

Symptom: AI creates/updates without waiting for approval

Fix:

  • Be more explicit: "WAIT for my confirmation"
  • Use confirmation tokens instead of yes/no
  • Add: "If I don't confirm, do NOT proceed"

Diff Not Clear

Symptom: Can't see what will change

Fix:

  • Ask AI to format diff as "Before → After"
  • Request side-by-side comparison
  • Ask to highlight only changed fields

Related Resources

Implement Safe Write Approvals

Use approval patterns to prevent accidental writes in MCP workflows