{
  "openapi": "3.1.0",
  "info": {
    "title": "Oakwood Resort Agent API",
    "version": "1.0.0",
    "description": "Real-time availability, pricing, and natural-language search for Oakwood Resort, Grand Bend, Ontario. Callable over MCP (JSON-RPC 2.0). Read tools need no credentials.",
    "contact": {
      "name": "Oakwood Resort",
      "url": "https://oakwoodresort.ca",
      "email": "info@oakwoodresort.ca"
    }
  },
  "servers": [
    {
      "url": "https://lfblymuupaflxihoehrh.supabase.co/functions/v1/agent-mcp",
      "description": "MCP JSON-RPC 2.0 endpoint"
    }
  ],
  "externalDocs": {
    "description": "Developer guide",
    "url": "https://oakwoodtest.com/developers"
  },
  "paths": {
    "/": {
      "post": {
        "summary": "MCP JSON-RPC 2.0 endpoint",
        "description": "Supports initialize, notifications/initialized, tools/list, and tools/call. The initialize handshake and all read tools work with no Authorization header.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              },
              "examples": {
                "get_property_info": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "get_property_info",
                      "arguments": {}
                    }
                  }
                },
                "search_rooms": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "search_rooms",
                      "arguments": {
                        "check_in": "2026-12-01",
                        "check_out": "2026-12-03",
                        "guests": 2
                      }
                    }
                  }
                },
                "get_quote": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "get_quote",
                      "arguments": {
                        "room_type_code": "MS2Q",
                        "check_in": "2026-12-01",
                        "check_out": "2026-12-03",
                        "guests": 2
                      }
                    }
                  }
                },
                "search_resort_info": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "search_resort_info",
                      "arguments": {
                        "query": "somewhere to get married by the lake",
                        "limit": 3
                      }
                    }
                  }
                },
                "initiate_booking": {
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/call",
                    "params": {
                      "name": "initiate_booking",
                      "arguments": {}
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result or error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Returns this OpenAPI spec and the tool list.",
        "responses": {
          "200": {
            "description": "OpenAPI document"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "type": [
              "integer",
              "string"
            ]
          },
          "method": {
            "type": "string",
            "enum": [
              "initialize",
              "notifications/initialized",
              "tools/list",
              "tools/call"
            ]
          },
          "params": {
            "type": "object"
          }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "type": [
              "integer",
              "string",
              "null"
            ]
          },
          "result": {
            "type": "object"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  },
  "x-tools": [
    {
      "name": "get_property_info",
      "authentication_required": false,
      "description": "Resort location, amenities, contact and policies.",
      "arguments": []
    },
    {
      "name": "search_rooms",
      "authentication_required": false,
      "description": "Real-time room availability and nightly rates for dates and party size.",
      "arguments": [
        {
          "name": "check_in",
          "type": "string (YYYY-MM-DD)",
          "required": true
        },
        {
          "name": "check_out",
          "type": "string (YYYY-MM-DD)",
          "required": true
        },
        {
          "name": "guests",
          "type": "integer",
          "required": false,
          "note": "default 2"
        }
      ]
    },
    {
      "name": "get_quote",
      "authentication_required": false,
      "description": "Exact price for a room type and dates — nightly rate, resort fee, 13% HST, total in CAD.",
      "arguments": [
        {
          "name": "room_type_code",
          "type": "string",
          "required": true,
          "note": "e.g. MS2Q, from search_rooms"
        },
        {
          "name": "check_in",
          "type": "string (YYYY-MM-DD)",
          "required": true
        },
        {
          "name": "check_out",
          "type": "string (YYYY-MM-DD)",
          "required": true
        },
        {
          "name": "guests",
          "type": "integer",
          "required": false,
          "note": "default 2"
        }
      ]
    },
    {
      "name": "search_resort_info",
      "authentication_required": false,
      "description": "Natural-language semantic search of resort information: rooms, dining, golf, events, weddings, amenities and policies.",
      "arguments": [
        {
          "name": "query",
          "type": "string",
          "required": true,
          "note": "plain-English question"
        },
        {
          "name": "limit",
          "type": "integer",
          "required": false,
          "note": "default 5, max 10"
        }
      ]
    },
    {
      "name": "initiate_booking",
      "authentication_required": true,
      "description": "Begin a booking (sends the guest an email verification code). Requires a bearer API key.",
      "arguments": []
    }
  ]
}