{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/klisten-co-kr/json-schema/klisten-co-kr-tool-rank-tool-schema.json",
  "title": "ToolRankTool",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/klisten-co-kr-openapi.json#/components/schemas/ToolRankTool",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
    },
    "catalog_source": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
    },
    "catalog_version": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
    },
    "catalog_observed_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
    },
    "snapshot_digest": {
      "type": "string",
      "pattern": "^sha256:[a-f0-9]{64}$"
    },
    "capabilities": {
      "maxItems": 128,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
      }
    },
    "transport": {
      "type": "string",
      "enum": [
        "streamable_http",
        "stdio",
        "sse"
      ]
    },
    "active": {
      "type": "boolean"
    },
    "observations": {
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
          },
          "tool_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
          },
          "snapshot_digest": {
            "type": "string",
            "pattern": "^sha256:[a-f0-9]{64}$"
          },
          "source": {
            "type": "string",
            "enum": [
              "independent_probe",
              "publisher_report"
            ]
          },
          "probe_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
          },
          "observed_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
          },
          "location": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
          },
          "available": {
            "type": "boolean"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 300000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "tool_id",
          "snapshot_digest",
          "source",
          "probe_id",
          "observed_at",
          "location",
          "available",
          "latency_ms"
        ],
        "additionalProperties": false
      }
    },
    "cost": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "currency": {
              "type": "string",
              "const": "USD"
            },
            "per_call_micro_usd": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "observed_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
            },
            "expires_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
            },
            "snapshot_digest": {
              "type": "string",
              "pattern": "^sha256:[a-f0-9]{64}$"
            }
          },
          "required": [
            "currency",
            "per_call_micro_usd",
            "observed_at",
            "expires_at",
            "snapshot_digest"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "trust": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "policy_id": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
            },
            "decision": {
              "type": "string",
              "enum": [
                "approved",
                "rejected",
                "unknown"
              ]
            },
            "observed_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
            },
            "expires_at": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{3}(?:Z))$"
            },
            "snapshot_digest": {
              "type": "string",
              "pattern": "^sha256:[a-f0-9]{64}$"
            }
          },
          "required": [
            "policy_id",
            "decision",
            "observed_at",
            "expires_at",
            "snapshot_digest"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "source_url": {
      "type": "string"
    },
    "raw_digest": {
      "type": "string",
      "pattern": "^sha256:[a-f0-9]{64}$"
    },
    "transport_advertised": {
      "type": "boolean"
    },
    "registry": {
      "type": "object",
      "properties": {
        "external_id": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "deprecated",
            "deleted",
            "unknown"
          ]
        }
      },
      "required": [
        "external_id",
        "version",
        "status"
      ],
      "additionalProperties": false
    },
    "evidence_status": {
      "type": "string",
      "const": "insufficient_evidence"
    },
    "metrics": {
      "type": "object",
      "properties": {
        "availability_bps": {
          "type": "null"
        },
        "latency_ms": {
          "type": "null"
        },
        "sample_count": {
          "type": "number",
          "const": 0
        }
      },
      "required": [
        "availability_bps",
        "latency_ms",
        "sample_count"
      ],
      "additionalProperties": false
    },
    "registration_is_safety_approval": {
      "type": "boolean",
      "const": false
    }
  },
  "required": [
    "id",
    "catalog_source",
    "catalog_version",
    "catalog_observed_at",
    "snapshot_digest",
    "capabilities",
    "transport",
    "active",
    "observations",
    "cost",
    "trust",
    "name",
    "description",
    "source_url",
    "raw_digest",
    "evidence_status",
    "metrics",
    "registration_is_safety_approval"
  ],
  "additionalProperties": false
}