{
  "openapi": "3.1.0",
  "info": {
    "title": "AT&T Products & Shopping Assistant API",
    "description": "Streamable HTTP MCP endpoint and REST address autocomplete and validation APIs for AT&T shopping.",
    "version": "1.26.0"
  },
  "servers": [
    {
      "url": "https://myhomenetwork.att.com"
    }
  ],
  "paths": {
    "/chatgptapps/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "Send an MCP JSON-RPC request",
        "description": "Uses the MCP streamable HTTP transport. Clients can list available tools or invoke a supported tool. The server may return a JSON response or an event stream.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              },
              "examples": {
                "listTools": {
                  "summary": "List supported tools",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "tools/list",
                    "params": {}
                  }
                },
                "callTool": {
                  "summary": "Call a shopping tool",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 2,
                    "method": "tools/call",
                    "params": {
                      "name": "att-fiber-coverage-checker",
                      "arguments": {
                        "address": "One AT&T Way, Dallas, TX 75202"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response or MCP event stream.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON-RPC or MCP request."
          },
          "401": {
            "description": "Authentication required by the deployment."
          },
          "500": {
            "description": "Server error."
          }
        }
      }
    },
    "/chatgptapps/api/address/autocomplete": {
      "get": {
        "operationId": "autocompleteAddress",
        "summary": "Autocomplete a residential address",
        "parameters": [
          { "name": "search", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "max", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 10 } },
          { "name": "selected", "in": "query", "required": false, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "Address suggestions.",
            "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } }
          },
          "400": { "description": "Invalid autocomplete request." }
        }
      }
    },
    "/chatgptapps/api/address/validate": {
      "get": {
        "operationId": "validateAddress",
        "summary": "Validate a residential address",
        "parameters": [
          { "name": "street", "in": "query", "required": true, "schema": { "type": "string" } },
          { "name": "city", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "state", "in": "query", "required": false, "schema": { "type": "string" } },
          { "name": "zipcode", "in": "query", "required": false, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "Validated and normalized address.",
            "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } }
          },
          "400": { "description": "Invalid address validation request." }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              { "type": "string" },
              { "type": "integer" }
            ]
          },
          "method": {
            "type": "string",
            "enum": ["initialize", "notifications/initialized", "tools/list", "tools/call"]
          },
          "params": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolCallParams"
              },
              {
                "$ref": "#/components/schemas/GenericParams"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": ["jsonrpc", "id"],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              { "type": "string" },
              { "type": "integer" },
              { "type": "null" }
            ]
          },
          "result": {
            "type": "object",
            "additionalProperties": true
          },
          "error": {
            "$ref": "#/components/schemas/JsonRpcError"
          }
        },
        "additionalProperties": false
      },
      "JsonRpcError": {
        "type": "object",
        "required": ["code", "message"],
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "data": {}
        },
        "additionalProperties": true
      },
      "GenericParams": {
        "type": "object",
        "description": "Parameters for MCP lifecycle and tool-list methods.",
        "additionalProperties": true
      },
      "ToolCallParams": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "att-fiber-coverage-checker",
              "att-fiber-plan-recommender",
              "att-fiber-journey-data",
              "att-device-shop",
              "att-plan-shop",
              "att-addons-accessories",
              "att-cart-checkout",
              "att-widget-api",
              "att-store-finder",
              "att-address-autocomplete",
              "att-address-validate"
            ]
          },
          "arguments": {
            "type": "object",
            "description": "Tool-specific arguments. See the MCP tools/list response for the authoritative schema.",
            "additionalProperties": true
          }
        },
        "additionalProperties": false
      }
    }
  }
}
