{
  "name": "find_booking",
  "description": "Look up an existing reservation by the phone number it was booked under. Call this before changing or cancelling anything. Read the booking back to the caller before you touch it. If nothing is found, say you can't find it under that number and take their details with capture_lead — do not guess at which booking they mean.",
  "speak_during_execution": true,
  "speak_after_execution": false,
  "execution_message_description": "e.g. 'Let me find that for you.'",
  "parameters": {
    "type": "object",
    "properties": {
      "caller_phone": {
        "type": "string",
        "description": "The phone number the booking was made under. Ask for it directly — it is the lookup key."
      },
      "date": {
        "type": "string",
        "description": "YYYY-MM-DD. Only include if the caller volunteered it, to disambiguate multiple bookings."
      }
    },
    "required": ["caller_phone"]
  },
  "response_schema": {
    "type": "object",
    "properties": {
      "bookings": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "booking_id": { "type": "string" },
            "date": { "type": "string" },
            "time": { "type": "string" },
            "party_size": { "type": "integer" },
            "caller_name": { "type": "string" },
            "notes": { "type": "string" }
          }
        }
      },
      "error": { "type": "string" }
    }
  },
  "_notes": {
    "privacy": "SECURITY.md §4 and 05-forbidden-topics.md: never confirm whether a NAMED person has a booking. This tool is keyed on the phone number the caller is calling about, and results are read back only to a caller who supplied that number. A caller asking about someone else's booking is an escalation, not a lookup.",
    "multiple_results": "If more than one booking comes back, read the dates and let the caller pick. Do not assume the nearest one.",
    "qa": "Exercised by TEST_PLAN.md case 14."
  }
}
