{
  "name": "cancel_or_modify_booking",
  "description": "Change or cancel an existing reservation you have already found with find_booking. Never create a second booking to fix a first one — modify the existing one, or cancel it. Leaving two events in the calendar is a real double-booking in a real restaurant.",
  "speak_during_execution": true,
  "speak_after_execution": false,
  "execution_message_description": "e.g. 'One moment while I update that.'",
  "parameters": {
    "type": "object",
    "properties": {
      "booking_id": {
        "type": "string",
        "description": "From find_booking. Required — never act on a booking you have not looked up."
      },
      "action": {
        "type": "string",
        "enum": ["modify", "cancel"]
      },
      "new_date": { "type": "string", "description": "YYYY-MM-DD. Only for action=modify. Check availability first." },
      "new_time": { "type": "string", "description": "HH:MM. Only for action=modify. Check availability first." },
      "new_party_size": { "type": "integer", "minimum": 1, "description": "Only for action=modify. If the new size exceeds the max self-serve party, escalate instead." },
      "cancellation_reason": {
        "type": "string",
        "description": "In the caller's own words, if they offered one. Never press for a reason."
      }
    },
    "required": ["booking_id", "action"]
  },
  "response_schema": {
    "type": "object",
    "properties": {
      "success": { "type": "boolean" },
      "confirmation_sent": { "type": "boolean" },
      "error": {
        "type": "string",
        "description": "On failure, tell the caller you couldn't make the change and take their details with capture_lead. Never say a change is done when this is set — the caller will arrive on the wrong day."
      }
    }
  },
  "_notes": {
    "availability": "A modify that moves the date or time requires check_availability first, exactly like a new booking.",
    "policy": "If the cancellation falls inside the client's cancellation window, state the policy verbatim from knowledge pack §D BEFORE cancelling. Do not negotiate it and do not waive it. Pushback is escalation trigger 4.",
    "no_orphans": "TEST_PLAN.md case 14 checks the calendar for orphan and duplicate events after a book-change-cancel sequence.",
    "qa": "Exercised by TEST_PLAN.md case 14."
  }
}
