{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stormmcp/json-schema/stormmcp-auxiliary-gateway-inventory-list-response-schema.json",
  "title": "AuxiliaryGatewayInventoryListResponse",
  "description": "One page of the Auxiliary Gateway listing (MCPG-1879), plus the one page-level fact the\n`userId` filter can add: whether the group half of that user's reachability could be\nresolved. `GatewayInventoryListContractTests` pins this envelope from its root, so adding\na property here means updating that allowlist under review.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stormmcp-mcpgatewayinventory-api-openapi.yml#/components/schemas/AuxiliaryGatewayInventoryListResponse",
  "type": "object",
  "properties": {
    "groupMembershipDegraded": {
      "type": "boolean",
      "description": "Gets or sets a value indicating whether the filtered user's group membership could not be\nresolved (MCPG-2221). Set only when a `userId` filter was supplied. When true the page\nstill answers, but only through the owner, unrestricted and direct-assignment arms of the\nreachability rule: a gateway that user reaches through a group alone may be missing.\nMirrors bool DynamicGatewayInventoryResponse.GroupMembershipDegraded."
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AuxiliaryGatewayInventoryResponse"
      },
      "description": "Gets or sets the items in the current page."
    },
    "totalCount": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "description": "Gets or sets the total count of items across all pages.",
      "format": "int32"
    },
    "pageNumber": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "description": "Gets or sets the current page number (1-based).",
      "format": "int32"
    },
    "pageSize": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "description": "Gets or sets the number of items per page.",
      "format": "int32"
    },
    "hasMore": {
      "type": "boolean",
      "description": "Gets a value indicating whether there are more pages available."
    },
    "totalPages": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "description": "Gets the total number of pages.",
      "format": "int32"
    }
  },
  "$defs": {
    "AuxiliaryGatewayInventoryResponse": {
      "type": "object",
      "properties": {
        "gatewayId": {
          "type": "string",
          "description": "Gets or sets the gateway identifier.",
          "format": "uuid"
        },
        "name": {
          "type": "string",
          "description": "Gets or sets the gateway name."
        },
        "scope": {
          "description": "Gets or sets the gateway's scope: Tenant or Personal.",
          "$ref": "#/$defs/Level"
        },
        "ownerUserId": {
          "type": "string",
          "description": "Gets or sets the identifier of the user who owns the gateway. An identifier rather than a\ndisplay name on purpose: the gateway has no user directory — Platform's\n`InternalUserService` exposes group membership and nothing else — so identity is\nresolved by the frontend, exactly as it already is for the assignment lists below.",
          "format": "uuid"
        },
        "applicationCount": {
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "integer",
            "string"
          ],
          "description": "Gets or sets how many applications the gateway includes.",
          "format": "int32"
        },
        "assignedUserIds": {
          "type": [
            "null",
            "array"
          ],
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "description": "Gets or sets the user principals granted access. Two states on the GET response\n(MCPG-2123 baked access assignments always on): an empty list means UNRESTRICTED, and a\npopulated list means restricted to those users. `null` is not a GET-response arm."
        },
        "assignedGroupIds": {
          "type": [
            "null",
            "array"
          ],
          "items": {
            "type": "string",
            "format": "uuid"
          },
          "description": "Gets or sets the group principals granted access, with the same two-state reading as\nIReadOnlyList&lt;Guid&gt;? AuxiliaryGatewayInventoryResponse.AssignedUserIds."
        },
        "clients": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GatewayInventoryClientResponse"
          },
          "description": "Gets or sets the clients the gateway has been reached through, most recently seen first."
        }
      },
      "description": "One Auxiliary Gateway row on the MCP Gateway Inventory list page (MCPG-1879). Configuration and\nreachability only: no credential material, no connection state, no tool bytes."
    },
    "ClientKind": {
      "type": "integer",
      "description": "The kind of MCP client that connected to a dynamic gateway (MCPG-1156), derived best-effort from the\nauthenticating bearer scheme at handshake time. Display-only; never an authorization input."
    },
    "GatewayInventoryClientResponse": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "null",
            "string"
          ],
          "description": "Gets or sets the client-supplied client name, or null when the client sent no\n`clientInfo` and is known only by its kind."
        },
        "kind": {
          "description": "Gets or sets the derived client kind.",
          "$ref": "#/$defs/ClientKind"
        },
        "lastSeen": {
          "type": "string",
          "description": "Gets or sets when this client was last active. The inventory reports recency rather than\nimplying it, because the two tables' registrations age differently: a Dynamic registration is\nreclaimed 24 hours after its last activity, while an Auxiliary one persists until the client\nterminates the session.",
          "format": "date-time"
        }
      },
      "description": "One MCP client a gateway has been reached through, as the durable session registry last recorded\nit (MCPG-1879). Display metadata only — nothing here identifies a session or lets the caller act\nas one."
    },
    "Level": {
      "enum": [
        "Personal",
        "Tenant"
      ]
    }
  }
}