{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "AlphaForge instructional tool contracts",
  "description": "Author-written request/response contracts for understanding and checking the build. NOT a Retell import or a captured provider-native schema. Native UI tool schemas/result paths still require authorized connection/test. Exact input modes and mapping are in TOOL-MAPPING.md.",
  "type": "object",
  "properties": {
    "availability_input": {
      "type": "object",
      "required": [
        "event_identifier",
        "timezone",
        "range_start",
        "range_end"
      ],
      "properties": {
        "event_identifier": {
          "type": [
            "string",
            "integer"
          ]
        },
        "timezone": {
          "const": "America/New_York"
        },
        "range_start": {
          "type": "string"
        },
        "range_end": {
          "type": "string"
        }
      }
    },
    "booking_input": {
      "type": "object",
      "required": [
        "event_identifier",
        "time",
        "timezone",
        "customer_name",
        "email",
        "explicit_agreement"
      ],
      "properties": {
        "event_identifier": {
          "type": [
            "string",
            "integer"
          ]
        },
        "time": {
          "type": "string",
          "description": "Local datetime YYYY-MM-DDTHH:mm:ss, from returned availability"
        },
        "timezone": {
          "const": "America/New_York"
        },
        "customer_name": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        },
        "callback_number": {
          "type": "string"
        },
        "issue": {
          "type": "string"
        },
        "explicit_agreement": {
          "const": true
        }
      }
    },
    "reschedule_input": {
      "type": "object",
      "required": [
        "current_booking_uid",
        "new_time",
        "timezone",
        "explicit_agreement"
      ],
      "properties": {
        "current_booking_uid": {
          "type": "string"
        },
        "new_time": {
          "type": "string"
        },
        "timezone": {
          "const": "America/New_York"
        },
        "explicit_agreement": {
          "const": true
        }
      }
    }
  },
  "examples": [
    {
      "availability_input": {
        "event_identifier": "REPLACE_WITH_REAL_EVENT_ID",
        "timezone": "America/New_York",
        "range_start": "2026-12-07T09:00:00",
        "range_end": "2026-12-07T17:00:00"
      },
      "booking_input": {
        "event_identifier": "REPLACE_WITH_REAL_EVENT_ID",
        "time": "2026-12-07T10:00:00",
        "timezone": "America/New_York",
        "customer_name": "Demo Visitor",
        "email": "demo@example.invalid",
        "explicit_agreement": true
      },
      "reschedule_input": {
        "current_booking_uid": "REPLACE_WITH_UID_FROM_REAL_RESPONSE",
        "new_time": "2026-12-07T11:00:00",
        "timezone": "America/New_York",
        "explicit_agreement": true
      }
    }
  ],
  "expected_result_examples": {
    "label": "Illustrative shape only, not a provider response",
    "success": "Tool reports success, actual UID/time are saved and independently inspected in Cal and Google; confirmation email observed separately",
    "failure": "Tool reports failure/unknown; no success announcement; inspect existing booking before retry"
  }
}
