{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/stormmcp/json-schema/stormmcp-radar-cache-response-schema.json",
  "title": "RadarCacheResponse",
  "description": "Current-user Radar cache view (MCPG-1156).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stormmcp-dynamicgateway-api-openapi.yml#/components/schemas/RadarCacheResponse",
  "type": "object",
  "properties": {
    "size": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "description": "Gets or sets the effective per-user cache slot budget.",
      "format": "int32"
    },
    "used": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "description": "Gets or sets the number of cached tools.",
      "format": "int32"
    },
    "entries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RadarCacheEntryResponse"
      },
      "description": "Gets or sets the cached tool entries, sorted by 7-day hits descending."
    },
    "minSize": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "description": "Gets or sets the inclusive minimum allowed int RadarCacheResponse.Size (`MaxPinnedTools + 1`).",
      "format": "int32"
    },
    "maxSize": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "description": "Gets or sets the inclusive maximum allowed int RadarCacheResponse.Size.",
      "format": "int32"
    },
    "step": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "description": "Gets or sets the size adjustment step (always 1 for integer slots).",
      "format": "int32"
    },
    "maxPinned": {
      "pattern": "^-?(?:0|[1-9]\\d*)$",
      "type": [
        "integer",
        "string"
      ],
      "description": "Gets or sets the maximum number of pinned tools.",
      "format": "int32"
    }
  },
  "$defs": {
    "RadarCacheEntryResponse": {
      "type": "object",
      "properties": {
        "toolName": {
          "type": "string",
          "description": "Gets or sets the tool name."
        },
        "serverName": {
          "type": [
            "null",
            "string"
          ],
          "description": "Gets or sets the upstream server name, or null when not derivable."
        },
        "libraryId": {
          "type": [
            "null",
            "string"
          ],
          "description": "Gets or sets the library id, or null when not derivable.",
          "format": "uuid"
        },
        "iconUrl": {
          "type": [
            "null",
            "string"
          ],
          "description": "Gets or sets the catalog icon URL, or null when not derivable."
        },
        "hits7d": {
          "pattern": "^-?(?:0|[1-9]\\d*)$",
          "type": [
            "integer",
            "string"
          ],
          "description": "Gets or sets the real 7-day successful-call count for the current user.",
          "format": "int32"
        },
        "pinned": {
          "type": "boolean",
          "description": "Gets or sets a value indicating whether the tool is pinned."
        }
      },
      "description": "One cached Radar tool entry (MCPG-1156)."
    }
  }
}