{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peakcam-io/json-schema/peakcam-io-ask-answer-schema.json",
  "title": "AskAnswer",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peakcam-io-openapi.json#/components/schemas/AskAnswer",
  "type": "object",
  "properties": {
    "question": {
      "type": "string"
    },
    "answerable": {
      "type": "boolean",
      "description": "False when the router found no resort or no intent it could serve; `data` is then null and `suggestions` says what to ask."
    },
    "intent": {
      "$ref": "#/$defs/AskIntent"
    },
    "tool": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The PeakCam MCP tool whose result is in `data`."
    },
    "arguments": {
      "anyOf": [
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        {
          "type": "null"
        }
      ],
      "description": "The arguments that tool was called with, so the call can be repeated over MCP."
    },
    "resort": {
      "anyOf": [
        {
          "$ref": "#/$defs/AskResortRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "The resort the question named (the first, for a comparison)."
    },
    "resorts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AskResortRef"
      },
      "description": "Every resort the question named, in order."
    },
    "place": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "state": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "country": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "state",
            "country"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "sentence": {
      "type": "string",
      "description": "A dated, source-labelled sentence that can be quoted verbatim."
    },
    "asOf": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "ISO instant of the newest report the sentence used; null when it used none."
    },
    "data": {
      "anyOf": [
        {},
        {
          "type": "null"
        }
      ],
      "description": "The tool's structured result (its documented `outputSchema`), or null."
    },
    "citations": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "PeakCam URLs to cite, the resort page first."
    },
    "suggestions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Questions the router can answer, offered when it could not answer this one."
    },
    "attribution": {
      "type": "string"
    },
    "license": {
      "type": "string"
    },
    "generatedAt": {
      "type": "string"
    }
  },
  "required": [
    "question",
    "answerable",
    "intent",
    "tool",
    "arguments",
    "resort",
    "resorts",
    "place",
    "sentence",
    "asOf",
    "data",
    "citations",
    "suggestions",
    "attribution",
    "license",
    "generatedAt"
  ],
  "additionalProperties": false,
  "$defs": {
    "AskIntent": {
      "type": "string",
      "enum": [
        "conditions",
        "openings",
        "forecast",
        "cams",
        "cam_timeline",
        "history",
        "compare",
        "powder",
        "percent_of_normal",
        "profile",
        "regions",
        "alerts",
        "unknown"
      ]
    },
    "AskResortRef": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "canonicalUrl": {
          "type": "string"
        }
      },
      "required": [
        "slug",
        "name",
        "canonicalUrl"
      ],
      "additionalProperties": false
    }
  }
}