{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-api-management/json-schema/microsoft-azure-api-management-ai-gateway-tool-server-resource-list-result-schema.json",
  "title": "AiGatewayToolServerResourceListResult",
  "description": "The response of a AiGatewayToolServerResource list operation.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-api-management-aigatewaytoolserverresources-api-openapi.yml#/components/schemas/AiGatewayToolServerResourceListResult",
  "type": "object",
  "properties": {
    "value": {
      "type": "array",
      "description": "The AiGatewayToolServerResource items on this page",
      "items": {
        "$ref": "#/$defs/AiGatewayToolServerResource"
      }
    },
    "nextLink": {
      "type": "string",
      "format": "uri",
      "description": "The link to the next page of items"
    }
  },
  "required": [
    "value"
  ],
  "$defs": {
    "AiGatewayAgentHook": {
      "type": "object",
      "description": "External hook settings; omitted fields inherit policy-level settings.",
      "properties": {
        "endpoint": {
          "type": "string",
          "format": "uri",
          "description": "Hook destination HTTPS URL."
        },
        "authorization": {
          "$ref": "#/$defs/AiGatewayAgentHookAuthorization",
          "description": "Hook authorization settings."
        },
        "headers": {
          "type": "object",
          "description": "Literal, non-secret HTTP headers, returned by read operations.",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "AiGatewayAgentHookAuthorization": {
      "type": "object",
      "description": "Authorization settings for an external agent hook.",
      "properties": {
        "type": {
          "$ref": "#/$defs/AiGatewayAgentHookAuthorizationType",
          "description": "Authorization kind."
        },
        "identity": {
          "$ref": "#/$defs/AiGatewayAgentHookIdentity",
          "description": "Managed identity selection, required for managedIdentity authorization."
        },
        "audience": {
          "type": "string",
          "format": "uri",
          "description": "Absolute token audience URI, required for managedIdentity authorization."
        }
      },
      "required": [
        "type"
      ]
    },
    "AiGatewayAgentHookAuthorizationType": {
      "type": "string",
      "description": "Authorization kind for an agent hook.",
      "enum": [
        "anonymous",
        "managedIdentity"
      ],
      "x-ms-enum": {
        "name": "AiGatewayAgentHookAuthorizationType",
        "modelAsString": true,
        "values": [
          {
            "name": "Anonymous",
            "value": "anonymous",
            "description": "Call without authentication."
          },
          {
            "name": "ManagedIdentity",
            "value": "managedIdentity",
            "description": "Authenticate using a managed identity."
          }
        ]
      }
    },
    "AiGatewayAgentHookIdentity": {
      "type": "object",
      "description": "Managed identity selected to authorize an agent hook.",
      "properties": {
        "type": {
          "$ref": "#/$defs/AiGatewayAgentHookIdentityType",
          "description": "Managed identity kind."
        },
        "clientId": {
          "type": "string",
          "description": "User-assigned identity client ID; omit for a system-assigned identity."
        }
      },
      "required": [
        "type"
      ]
    },
    "AiGatewayAgentHookIdentityType": {
      "type": "string",
      "description": "Managed identity kind selected for an agent hook.",
      "enum": [
        "systemAssigned",
        "userAssigned"
      ],
      "x-ms-enum": {
        "name": "AiGatewayAgentHookIdentityType",
        "modelAsString": true,
        "values": [
          {
            "name": "SystemAssigned",
            "value": "systemAssigned",
            "description": "Use the gateway's system-assigned identity."
          },
          {
            "name": "UserAssigned",
            "value": "userAssigned",
            "description": "Use a user-assigned identity."
          }
        ]
      }
    },
    "AiGatewayAgentHooks": {
      "type": "object",
      "description": "Lifecycle hooks supported on tool servers.",
      "properties": {
        "preToolCall": {
          "$ref": "#/$defs/AiGatewayAgentHook",
          "description": "Hook invoked before calling a tool."
        },
        "postToolCall": {
          "$ref": "#/$defs/AiGatewayAgentHook",
          "description": "Hook invoked after calling a tool."
        }
      }
    },
    "AiGatewayContentSafetySeverity": {
      "type": "string",
      "description": "Severity threshold used by a content safety policy.",
      "enum": [
        "Low",
        "Medium",
        "High",
        "None"
      ],
      "x-ms-enum": {
        "name": "AiGatewayContentSafetySeverity",
        "modelAsString": true,
        "values": [
          {
            "name": "Low",
            "value": "Low",
            "description": "Low severity."
          },
          {
            "name": "Medium",
            "value": "Medium",
            "description": "Medium severity."
          },
          {
            "name": "High",
            "value": "High",
            "description": "High severity."
          },
          {
            "name": "None",
            "value": "None",
            "description": "Do not filter this category."
          }
        ]
      }
    },
    "AiGatewayCostLimitOverride": {
      "type": "object",
      "description": "An ordered cost-budget override; exactly one selector must be specified.",
      "properties": {
        "claims": {
          "type": "object",
          "description": "Authenticated token claims that must all match; dictionary keys are case-sensitive claim names.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "apiKeyResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "Azure resource identifier of the API key selecting this override.",
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.ApiManagement/aigateways/apiKeys"
              },
              {
                "type": "Microsoft.ApiManagement/service/apiKeys"
              }
            ]
          }
        },
        "amount": {
          "type": "number",
          "format": "decimal",
          "description": "Override budget in US dollars."
        }
      },
      "required": [
        "amount"
      ]
    },
    "AiGatewayCounterDimension": {
      "type": "string",
      "description": "Public request dimension used to partition a policy counter.",
      "enum": [
        "identity",
        "ipAddress"
      ],
      "x-ms-enum": {
        "name": "AiGatewayCounterDimension",
        "modelAsString": true,
        "values": [
          {
            "name": "Identity",
            "value": "identity",
            "description": "Authenticated request identity."
          },
          {
            "name": "IpAddress",
            "value": "ipAddress",
            "description": "Request source IP address."
          }
        ]
      }
    },
    "AiGatewayEndpoint": {
      "type": "object",
      "description": "A client-facing endpoint for invoking an AI Gateway resource.",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Complete HTTPS invocation URL.",
          "readOnly": true
        },
        "baseUrl": {
          "type": "string",
          "format": "uri",
          "description": "HTTPS base URL for SDKs that construct operation paths, when metadata is enabled.",
          "readOnly": true
        },
        "api": {
          "type": "string",
          "description": "API identifier relative to the provider prefix, when metadata is enabled.",
          "readOnly": true
        }
      },
      "required": [
        "url"
      ]
    },
    "AiGatewayFallbackTarget": {
      "type": "object",
      "description": "A fallback target for a model policy.",
      "properties": {
        "modelId": {
          "type": "string",
          "format": "arm-id",
          "description": "Resource identifier of a model in the same workspace.",
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.ApiManagement/aigateways/workspaces/modelProviders/models"
              },
              {
                "type": "Microsoft.ApiManagement/service/workspaces/modelProviders/models"
              }
            ]
          }
        }
      },
      "required": [
        "modelId"
      ]
    },
    "AiGatewayIpFilterAction": {
      "type": "string",
      "description": "Action performed by an IP filtering policy.",
      "enum": [
        "Allow",
        "Deny"
      ],
      "x-ms-enum": {
        "name": "AiGatewayIpFilterAction",
        "modelAsString": true,
        "values": [
          {
            "name": "Allow",
            "value": "Allow",
            "description": "Allow matching addresses."
          },
          {
            "name": "Deny",
            "value": "Deny",
            "description": "Deny matching addresses."
          }
        ]
      }
    },
    "AiGatewayMcpUrlConfiguration": {
      "type": "object",
      "description": "MCP URL endpoint configuration.",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Backend MCP server endpoint."
        },
        "transport": {
          "$ref": "#/$defs/AiGatewayToolServerMcpTransport",
          "description": "MCP transport."
        }
      },
      "required": [
        "url"
      ]
    },
    "AiGatewayOpenApiConfiguration": {
      "type": "object",
      "description": "OpenAPI-backed MCP endpoint configuration.",
      "properties": {
        "specSource": {
          "$ref": "#/$defs/AiGatewayOpenApiSpecSource",
          "description": "OpenAPI document source."
        }
      },
      "required": [
        "specSource"
      ]
    },
    "AiGatewayOpenApiSpecSource": {
      "type": "object",
      "description": "Source of an OpenAPI document.",
      "properties": {
        "type": {
          "$ref": "#/$defs/AiGatewayToolServerOpenApiSourceType",
          "description": "Source type."
        },
        "contentBase64": {
          "type": "string",
          "format": "password",
          "description": "Base64-encoded OpenAPI document. Required when kind is Inline.",
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "URL of the OpenAPI document. Required when kind is Url."
        }
      },
      "required": [
        "type"
      ]
    },
    "AiGatewayPolicy": {
      "type": "object",
      "description": "An inline policy. Supported policy types and scopes depend on the parent resource.",
      "properties": {
        "type": {
          "$ref": "#/$defs/AiGatewayPolicyType",
          "description": "Policy type."
        },
        "scope": {
          "$ref": "#/$defs/AiGatewayPolicyScope",
          "description": "Policy scope. Workspace counter policies use workspace; other policies use resource. Agent hooks require an explicit resource scope."
        },
        "id": {
          "type": "string",
          "description": "Stable identifier, required for costLimit and agentHooks policies."
        },
        "count": {
          "type": "integer",
          "format": "int32",
          "description": "Token count allowed during a token limit period.",
          "minimum": 1
        },
        "period": {
          "$ref": "#/$defs/AiGatewayPolicyPeriod",
          "description": "Counter period. Token limits support minute/hour/day; cost limits support hour/day/week/month/year."
        },
        "counterKey": {
          "type": "array",
          "description": "Unique public dimensions used to partition a token, cost, or request counter.",
          "items": {
            "$ref": "#/$defs/AiGatewayCounterDimension"
          }
        },
        "amount": {
          "type": "number",
          "format": "decimal",
          "description": "Cost budget in US dollars."
        },
        "overrides": {
          "type": "array",
          "description": "Ordered cost-budget overrides; supported only for counterKey [identity]. The first match wins.",
          "items": {
            "$ref": "#/$defs/AiGatewayCostLimitOverride"
          },
          "x-ms-identifiers": []
        },
        "preInvocation": {
          "type": "boolean",
          "description": "Whether to check tool requests for threats."
        },
        "postInvocation": {
          "type": "boolean",
          "description": "Whether to check tool responses for threats."
        },
        "endpoint": {
          "type": "string",
          "format": "uri",
          "description": "Default HTTPS destination for agent hooks."
        },
        "authorization": {
          "$ref": "#/$defs/AiGatewayAgentHookAuthorization",
          "description": "Default authorization for agent hooks."
        },
        "headers": {
          "type": "object",
          "description": "Literal non-secret default HTTP headers for agent hooks.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "hooks": {
          "$ref": "#/$defs/AiGatewayAgentHooks",
          "description": "Lifecycle hooks; requires agent-hook authoring to be enabled on the gateway."
        },
        "hateSeverity": {
          "$ref": "#/$defs/AiGatewayContentSafetySeverity",
          "description": "Hate-content severity threshold."
        },
        "violenceSeverity": {
          "$ref": "#/$defs/AiGatewayContentSafetySeverity",
          "description": "Violence-content severity threshold."
        },
        "sexualSeverity": {
          "$ref": "#/$defs/AiGatewayContentSafetySeverity",
          "description": "Sexual-content severity threshold."
        },
        "selfHarmSeverity": {
          "$ref": "#/$defs/AiGatewayContentSafetySeverity",
          "description": "Self-harm-content severity threshold."
        },
        "threshold": {
          "type": "integer",
          "format": "int32",
          "description": "Consecutive failure count that opens a fallback circuit."
        },
        "tripDurationSeconds": {
          "type": "integer",
          "format": "int32",
          "description": "Duration for which the fallback circuit remains open."
        },
        "fallbackTargets": {
          "type": "array",
          "description": "Ordered fallback model targets.",
          "items": {
            "$ref": "#/$defs/AiGatewayFallbackTarget"
          },
          "x-ms-identifiers": [
            "modelId"
          ]
        },
        "action": {
          "$ref": "#/$defs/AiGatewayIpFilterAction",
          "description": "IP filtering action."
        },
        "cidrRanges": {
          "type": "array",
          "description": "CIDR ranges to allow or deny.",
          "items": {
            "type": "string"
          }
        },
        "callsPerPeriod": {
          "type": "integer",
          "format": "int32",
          "description": "Request count allowed during the configured period.",
          "minimum": 1
        },
        "periodSeconds": {
          "type": "integer",
          "format": "int32",
          "description": "Request rate limit period in seconds."
        },
        "allowedOrigins": {
          "type": "array",
          "description": "Origins allowed by a CORS policy.",
          "items": {
            "type": "string"
          }
        },
        "allowedMethods": {
          "type": "array",
          "description": "HTTP methods allowed by a CORS policy.",
          "items": {
            "type": "string"
          }
        },
        "allowedHeaders": {
          "type": "array",
          "description": "HTTP headers allowed by a CORS policy.",
          "items": {
            "type": "string"
          }
        },
        "exposeHeaders": {
          "type": "array",
          "description": "Response headers exposed to the browser.",
          "items": {
            "type": "string"
          }
        },
        "allowCredentials": {
          "type": "boolean",
          "description": "Whether browsers may send credentials."
        },
        "terminateUnmatchedRequest": {
          "type": "boolean",
          "description": "Whether unmatched CORS requests are terminated."
        },
        "preflightResultMaxAge": {
          "type": "integer",
          "format": "int32",
          "description": "Browser preflight cache duration in seconds."
        }
      },
      "required": [
        "type"
      ]
    },
    "AiGatewayPolicyPeriod": {
      "type": "string",
      "description": "Counter period. Token limits support minute/hour/day; cost limits support hour/day/week/month/year.",
      "enum": [
        "minute",
        "hour",
        "day",
        "week",
        "month",
        "year"
      ],
      "x-ms-enum": {
        "name": "AiGatewayPolicyPeriod",
        "modelAsString": true,
        "values": [
          {
            "name": "Minute",
            "value": "minute",
            "description": "One minute."
          },
          {
            "name": "Hour",
            "value": "hour",
            "description": "One hour."
          },
          {
            "name": "Day",
            "value": "day",
            "description": "One day."
          },
          {
            "name": "Week",
            "value": "week",
            "description": "One week, for cost limits only."
          },
          {
            "name": "Month",
            "value": "month",
            "description": "One month, for cost limits only."
          },
          {
            "name": "Year",
            "value": "year",
            "description": "One year, for cost limits only."
          }
        ]
      }
    },
    "AiGatewayPolicyScope": {
      "type": "string",
      "description": "Aggregation scope of an inline policy.",
      "enum": [
        "resource",
        "workspace"
      ],
      "x-ms-enum": {
        "name": "AiGatewayPolicyScope",
        "modelAsString": true,
        "values": [
          {
            "name": "Resource",
            "value": "resource",
            "description": "Apply the policy to its resource."
          },
          {
            "name": "Workspace",
            "value": "workspace",
            "description": "Aggregate counters across the workspace. Supported for workspace counter policies only."
          }
        ]
      }
    },
    "AiGatewayPolicyType": {
      "type": "string",
      "description": "The type of an inline AI Gateway policy.",
      "enum": [
        "tokenLimit",
        "contentSafety",
        "fallback",
        "ipFilter",
        "requestRateLimit",
        "cors",
        "costLimit",
        "toolThreatProtection",
        "agentHooks"
      ],
      "x-ms-enum": {
        "name": "AiGatewayPolicyType",
        "modelAsString": true,
        "values": [
          {
            "name": "TokenLimit",
            "value": "tokenLimit",
            "description": "Limit consumed tokens."
          },
          {
            "name": "ContentSafety",
            "value": "contentSafety",
            "description": "Filter unsafe content."
          },
          {
            "name": "Fallback",
            "value": "fallback",
            "description": "Route to fallback models after failures."
          },
          {
            "name": "IpFilter",
            "value": "ipFilter",
            "description": "Filter clients by IP address."
          },
          {
            "name": "RequestRateLimit",
            "value": "requestRateLimit",
            "description": "Limit requests over time."
          },
          {
            "name": "Cors",
            "value": "cors",
            "description": "Configure cross-origin resource sharing."
          },
          {
            "name": "CostLimit",
            "value": "costLimit",
            "description": "Limit cumulative spending in US dollars."
          },
          {
            "name": "ToolThreatProtection",
            "value": "toolThreatProtection",
            "description": "Check tool requests and responses for threats."
          },
          {
            "name": "AgentHooks",
            "value": "agentHooks",
            "description": "Invoke external pre-tool-call and post-tool-call hooks when authoring is enabled."
          }
        ]
      }
    },
    "AiGatewayProvisioningState": {
      "type": "string",
      "description": "Provisioning state of an AI Gateway resource.",
      "enum": [
        "Succeeded",
        "Failed",
        "Canceled"
      ],
      "x-ms-enum": {
        "name": "AiGatewayProvisioningState",
        "modelAsString": true,
        "values": [
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "The resource is ready."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "The resource operation failed."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "The resource operation was canceled."
          }
        ]
      },
      "readOnly": true
    },
    "AiGatewayToolServerAccessState": {
      "type": "string",
      "description": "Tool server access state.",
      "enum": [
        "active",
        "blocked"
      ],
      "x-ms-enum": {
        "name": "AiGatewayToolServerAccessState",
        "modelAsString": true,
        "values": [
          {
            "name": "Active",
            "value": "active",
            "description": "Tool server is available."
          },
          {
            "name": "Blocked",
            "value": "blocked",
            "description": "Tool server is blocked."
          }
        ]
      }
    },
    "AiGatewayToolServerAuthenticationType": {
      "type": "string",
      "description": "Endpoint authentication type.",
      "enum": [
        "none",
        "header",
        "oauth2",
        "managedIdentity"
      ],
      "x-ms-enum": {
        "name": "AiGatewayToolServerAuthenticationType",
        "modelAsString": true,
        "values": [
          {
            "name": "None",
            "value": "none",
            "description": "No authentication."
          },
          {
            "name": "Header",
            "value": "header",
            "description": "Static HTTP header authentication."
          },
          {
            "name": "OAuth2",
            "value": "oauth2",
            "description": "OAuth 2.0 authentication."
          },
          {
            "name": "ManagedIdentity",
            "value": "managedIdentity",
            "description": "Managed identity authentication."
          }
        ]
      }
    },
    "AiGatewayToolServerCredentials": {
      "type": "object",
      "description": "Credentials for a tool server endpoint.",
      "properties": {
        "type": {
          "$ref": "#/$defs/AiGatewayToolServerAuthenticationType",
          "description": "Authentication type."
        },
        "headers": {
          "type": "array",
          "description": "Static headers injected when calling the endpoint.",
          "items": {
            "$ref": "#/$defs/AiGatewayToolServerHeader"
          },
          "x-ms-identifiers": [
            "name"
          ]
        },
        "oauth2": {
          "$ref": "#/$defs/AiGatewayToolServerOauth2Authentication",
          "description": "OAuth 2.0 configuration."
        },
        "managedIdentity": {
          "$ref": "#/$defs/AiGatewayToolServerManagedIdentityAuthentication",
          "description": "Managed identity configuration."
        }
      },
      "required": [
        "type"
      ]
    },
    "AiGatewayToolServerEndpoint": {
      "type": "object",
      "description": "A tool server endpoint.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable endpoint identifier. Generated when omitted."
        },
        "namespace": {
          "type": "string",
          "description": "Optional namespace used to prefix tool names."
        },
        "kind": {
          "$ref": "#/$defs/AiGatewayToolServerEndpointSourceKind",
          "description": "Endpoint type."
        },
        "mcp": {
          "$ref": "#/$defs/AiGatewayMcpUrlConfiguration",
          "description": "Backend MCP configuration. Required when kind is mcp."
        },
        "openApi": {
          "$ref": "#/$defs/AiGatewayOpenApiConfiguration",
          "description": "OpenAPI configuration. Required when kind is McpFromOpenApi."
        },
        "credentials": {
          "$ref": "#/$defs/AiGatewayToolServerCredentials",
          "description": "Backend credentials."
        },
        "tools": {
          "type": "array",
          "description": "Upstream tool names or glob patterns to expose.",
          "items": {
            "type": "string"
          }
        },
        "required": {
          "type": "boolean",
          "description": "Whether endpoint failure fails the whole federation. Defaults to false.",
          "default": false
        }
      },
      "required": [
        "kind"
      ]
    },
    "AiGatewayToolServerEndpointSourceKind": {
      "type": "string",
      "description": "Endpoint source kind.",
      "enum": [
        "mcp",
        "openApi"
      ],
      "x-ms-enum": {
        "name": "AiGatewayToolServerEndpointSourceKind",
        "modelAsString": true,
        "values": [
          {
            "name": "Mcp",
            "value": "mcp",
            "description": "MCP server endpoint."
          },
          {
            "name": "OpenApi",
            "value": "openApi",
            "description": "OpenAPI document endpoint."
          }
        ]
      }
    },
    "AiGatewayToolServerHeader": {
      "type": "object",
      "description": "An HTTP header injected when calling a tool server endpoint.",
      "properties": {
        "name": {
          "type": "string",
          "description": "HTTP header name."
        },
        "values": {
          "type": "array",
          "format": "password",
          "description": "Secret values for the HTTP header.",
          "items": {
            "type": "string"
          },
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        }
      },
      "required": [
        "name",
        "values"
      ]
    },
    "AiGatewayToolServerManagedIdentityAuthentication": {
      "type": "object",
      "description": "Managed identity authentication for a tool server endpoint.",
      "properties": {
        "resource": {
          "type": "string",
          "description": "Token audience for managed identity authentication."
        },
        "clientId": {
          "type": "string",
          "description": "Client ID of a user-assigned managed identity."
        }
      },
      "required": [
        "resource"
      ]
    },
    "AiGatewayToolServerMcpTransport": {
      "type": "string",
      "description": "MCP transport protocol.",
      "enum": [
        "streamableHttp"
      ],
      "x-ms-enum": {
        "name": "AiGatewayToolServerMcpTransport",
        "modelAsString": true,
        "values": [
          {
            "name": "StreamableHttp",
            "value": "streamableHttp",
            "description": "Streamable HTTP transport."
          }
        ]
      }
    },
    "AiGatewayToolServerOauth2Authentication": {
      "type": "object",
      "description": "OAuth 2.0 authentication for a tool server endpoint.",
      "properties": {
        "issuer": {
          "type": "string",
          "format": "uri",
          "description": "Expected OAuth authorization-server issuer for remote MCP discovery."
        },
        "authorizationUrl": {
          "type": "string",
          "format": "uri",
          "description": "OAuth authorization endpoint."
        },
        "tokenUrl": {
          "type": "string",
          "format": "uri",
          "description": "OAuth token endpoint."
        },
        "clientId": {
          "type": "string",
          "description": "OAuth client identifier."
        },
        "clientSecret": {
          "type": "string",
          "format": "password",
          "description": "OAuth client secret.",
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        },
        "scopes": {
          "type": "array",
          "description": "OAuth scopes to request.",
          "items": {
            "type": "string"
          }
        },
        "grantType": {
          "$ref": "#/$defs/AiGatewayToolServerOauth2GrantType",
          "description": "OAuth grant type."
        },
        "authorizationParameters": {
          "type": "array",
          "description": "Additional authorization endpoint parameters.",
          "items": {
            "$ref": "#/$defs/AiGatewayToolServerOauth2Parameter"
          },
          "x-ms-identifiers": [
            "name"
          ]
        },
        "tokenParameters": {
          "type": "array",
          "description": "Additional token endpoint parameters.",
          "items": {
            "$ref": "#/$defs/AiGatewayToolServerOauth2Parameter"
          },
          "x-ms-identifiers": [
            "name"
          ]
        },
        "status": {
          "type": "string",
          "description": "Current OAuth connection status.",
          "readOnly": true
        },
        "loginLink": {
          "type": "string",
          "format": "uri",
          "description": "Login link used to complete interactive authorization.",
          "readOnly": true
        },
        "statusUpdatedUtc": {
          "type": "string",
          "format": "date-time",
          "description": "UTC timestamp of the last OAuth connection-status transition.",
          "readOnly": true
        }
      }
    },
    "AiGatewayToolServerOauth2GrantType": {
      "type": "string",
      "description": "OAuth 2.0 grant type.",
      "enum": [
        "clientCredentials",
        "authorizationCode"
      ],
      "x-ms-enum": {
        "name": "AiGatewayToolServerOauth2GrantType",
        "modelAsString": true,
        "values": [
          {
            "name": "ClientCredentials",
            "value": "clientCredentials",
            "description": "Client credentials grant."
          },
          {
            "name": "AuthorizationCode",
            "value": "authorizationCode",
            "description": "Authorization code grant."
          }
        ]
      }
    },
    "AiGatewayToolServerOauth2Parameter": {
      "type": "object",
      "description": "An additional parameter sent to an OAuth 2.0 endpoint.",
      "properties": {
        "name": {
          "type": "string",
          "description": "OAuth parameter name."
        },
        "value": {
          "type": "string",
          "description": "OAuth parameter value."
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "AiGatewayToolServerOpenApiSourceType": {
      "type": "string",
      "description": "OpenAPI document source type.",
      "enum": [
        "inline",
        "url"
      ],
      "x-ms-enum": {
        "name": "AiGatewayToolServerOpenApiSourceType",
        "modelAsString": true,
        "values": [
          {
            "name": "Inline",
            "value": "inline",
            "description": "Inline OpenAPI document."
          },
          {
            "name": "Url",
            "value": "url",
            "description": "OpenAPI document fetched from a URL."
          }
        ]
      }
    },
    "AiGatewayToolServerProperties": {
      "type": "object",
      "description": "Properties of an AI Gateway tool server.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Display name of the tool server.",
          "x-ms-client-name": "displayName"
        },
        "description": {
          "type": "string",
          "description": "Description of the tool server."
        },
        "accessState": {
          "$ref": "#/$defs/AiGatewayToolServerAccessState",
          "description": "Whether the tool server is available to callers."
        },
        "type": {
          "$ref": "#/$defs/AiGatewayToolServerType",
          "description": "Tool server type.",
          "x-ms-client-name": "toolServerType"
        },
        "versions": {
          "type": "array",
          "description": "Runtime API versions exposed by this tool server.",
          "items": {
            "type": "string"
          }
        },
        "allowList": {
          "type": "array",
          "description": "Tool names or patterns explicitly allowed.",
          "items": {
            "type": "string"
          }
        },
        "blocked": {
          "type": "array",
          "description": "Tool names or patterns explicitly blocked.",
          "items": {
            "type": "string"
          }
        },
        "endpoints": {
          "type": "array",
          "description": "Endpoint configurations exposed by this tool server.",
          "items": {
            "$ref": "#/$defs/AiGatewayToolServerEndpoint"
          },
          "x-ms-identifiers": [
            "id"
          ]
        },
        "policies": {
          "type": "array",
          "description": "Inline policies applied to this tool server.",
          "items": {
            "$ref": "#/$defs/AiGatewayPolicy"
          },
          "x-ms-identifiers": []
        },
        "path": {
          "type": "string",
          "description": "Runtime path for the tool server."
        },
        "subscriptionRequired": {
          "type": "boolean",
          "description": "Whether a subscription is required to invoke the tool server."
        },
        "gatewayEndpoints": {
          "type": "array",
          "description": "Read-only invocation URLs, with optional SDK metadata when endpoint enrichment is enabled.",
          "items": {
            "$ref": "#/$defs/AiGatewayEndpoint"
          },
          "readOnly": true,
          "x-ms-identifiers": [
            "url"
          ]
        },
        "provisioningState": {
          "$ref": "#/$defs/AiGatewayProvisioningState",
          "description": "Provisioning state of the resource.",
          "readOnly": true
        }
      },
      "required": [
        "type"
      ]
    },
    "AiGatewayToolServerResource": {
      "type": "object",
      "description": "An AI Gateway tool server resource.",
      "properties": {
        "properties": {
          "$ref": "#/$defs/AiGatewayToolServerProperties",
          "description": "The resource-specific properties for this resource."
        },
        "eTag": {
          "type": "string",
          "description": "If eTag is provided in the response body, it may also be provided as a header per the normal etag convention.  Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.",
          "readOnly": true
        }
      },
      "allOf": [
        {
          "$ref": "#/$defs/ProxyResource"
        }
      ]
    },
    "AiGatewayToolServerType": {
      "type": "string",
      "description": "How a tool server is exposed.",
      "enum": [
        "mcp",
        "openApi",
        "connector"
      ],
      "x-ms-enum": {
        "name": "AiGatewayToolServerType",
        "modelAsString": true,
        "values": [
          {
            "name": "Mcp",
            "value": "mcp",
            "description": "Federates one or more MCP servers."
          },
          {
            "name": "OpenApi",
            "value": "openApi",
            "description": "Exposes tools generated from OpenAPI documents."
          },
          {
            "name": "Connector",
            "value": "connector",
            "description": "Exposes a connector-backed tool server."
          }
        ]
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    }
  }
}