{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://adcontextprotocol.org/schemas/3.3.0-rc.0/error-details/rate-limited.json",
  "title": "Rate Limited Details",
  "description": "Recommended details shape for RATE_LIMITED errors. Provides rate limit window information so agents can plan request pacing.",
  "type": "object",
  "properties": {
    "limit": {
      "type": "number",
      "description": "Maximum requests allowed in the window"
    },
    "remaining": {
      "type": "number",
      "description": "Requests remaining in the current window"
    },
    "window_seconds": {
      "type": "number",
      "description": "Duration of the rate-limit window in seconds"
    },
    "scope": {
      "type": "string",
      "x-deprecated-enum-values": [
        "global"
      ],
      "x-deprecated-enum-values-doc": "Deprecated in 3.3 and removed in 4.0 (#8791): `global` is a Python keyword, so generated SDKs must rename it. Use `all`. Receivers accept both values through 3.x. Send the replacement only when the release served is 3.3 or later; a 3.2 receiver treats it as an unknown value. A published file, such as `adagents.json`, keeps the original through 3.x.",
      "enum": [
        "account",
        "tool",
        "global",
        "all"
      ],
      "enumDescriptions": {
        "account": "The limit applies to the calling account.",
        "tool": "The limit applies to the tool that was called.",
        "global": "**Deprecated in 3.3**, removed in 4.0: use `all`. The limit applies across the whole agent.",
        "all": "The limit applies to all traffic the agent receives, from every caller, account and tool. Replaces the deprecated `global`; a receiver on AdCP 3.2 or earlier treats it as an unknown value. Not the same as `agent` in `enums/error-scope.json`, which means the calling buyer agent."
      },
      "enumMetadata": {
        "global": {
          "deprecated": true,
          "x-deprecated-in": "3.3.0",
          "x-removed-in": "4.0.0",
          "x-superseded-by": "all"
        }
      },
      "description": "What the limit applies to"
    }
  },
  "additionalProperties": true
}
