{
  "openapi": "3.1.0",
  "info": {
    "title": "AI + Vitals",
    "version": "1.0.0",
    "description": "Read-only access to the signed-in user's wearable data (Oura Ring, or Apple Watch via Apple Health) from AI + Vitals. General wellness information, not medical advice."
  },
  "servers": [{ "url": "https://aiplusvitals.com" }],
  "paths": {
    "/mcp/v1/health": {
      "get": {
        "operationId": "getHealthData",
        "summary": "Get the user's health data",
        "description": "Returns `week`: the last 7 days compared with the 4 weeks before (sleep, HRV, resting heart rate, readiness, activity, bedtime, with highlights and tips), and `days`: one row per day, oldest first. Use it for any question about the user's sleep, recovery, HRV, heart rate, steps or trends. Describe patterns; never diagnose or name a disease.",
        "x-openai-isConsequential": false,
        "parameters": [
          { "name": "days", "in": "query", "required": false, "description": "How many recent days of daily rows to return (7 to 90).", "schema": { "type": "integer", "minimum": 7, "maximum": 90, "default": 35 } }
        ],
        "responses": {
          "200": {
            "description": "Weekly summary and daily rows",
            "content": { "application/json": { "schema": { "type": "object", "properties": {
              "today": { "type": "string" },
              "source": { "type": "string", "enum": ["oura", "apple_health"] },
              "first_name": { "type": ["string", "null"] },
              "language": { "type": "object", "properties": { "code": { "type": "string" }, "name": { "type": "string" } } },
              "week": { "type": "object", "additionalProperties": true },
              "days": { "type": "array", "items": { "type": "object", "additionalProperties": true } }
            } } } }
          },
          "409": { "description": "No device connected yet" }
        }
      }
    }
  }
}
