{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://llmdirectory.si/directory/cards/capability-card.schema.json",
  "title": "LLMDirectory.si Capability Card 1.2",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9-]{0,59}$"
    },
    "card_uuid": {
      "type": "string",
      "format": "uuid"
    },
    "resource_type": {
      "type": "string"
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "representative_queries": {
      "type": "array",
      "minItems": 3,
      "maxItems": 5,
      "uniqueItems": true,
      "items": {
        "type": "string"
      }
    },
    "risk_level": {
      "enum": [
        "low",
        "medium",
        "high",
        "critical",
        null
      ]
    },
    "data_classes": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "permissions_required": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "pricing_model": {
      "type": "object"
    },
    "mcp_endpoint": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "install_mode": {
      "enum": [
        "one_click",
        "manual",
        "hosted",
        "browser",
        null
      ]
    },
    "mcpb_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "verification": {
      "type": "object",
      "required": [
        "status",
        "last_verified_at",
        "source_platform",
        "scope",
        "security_certification"
      ],
      "properties": {
        "status": {
          "enum": [
            "listed",
            "tested_specific_path"
          ]
        },
        "last_verified_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "source_platform": {
          "type": [
            "string",
            "null"
          ]
        },
        "scope": {
          "type": "string"
        },
        "security_certification": {
          "const": false
        }
      }
    },
    "data_residency": {
      "enum": [
        "eu",
        "non_eu",
        "on_device",
        null
      ]
    },
    "ard_document_url": {
      "type": "string",
      "format": "uri"
    },
    "claim_evidence": {
      "description": "Additive, claim-level evidence. An empty array means no scoped evidence was published; it does not imply the entry is unsafe or that its claims were verified.",
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "level",
          "claim",
          "checked_on",
          "source_url",
          "scope",
          "method"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9-]+$"
          },
          "level": {
            "enum": [
              "provider_documented",
              "editorially_reviewed",
              "first_party_executed"
            ]
          },
          "claim": {
            "type": "string",
            "minLength": 1
          },
          "checked_on": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "source_url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "scope": {
            "type": "string",
            "minLength": 1
          },
          "method": {
            "type": "string",
            "minLength": 1
          }
        },
        "allOf": [
          {
            "if": {
              "properties": {
                "level": {
                  "enum": [
                    "editorially_reviewed",
                    "first_party_executed"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "checked_on": {
                  "type": "string",
                  "format": "date"
                }
              }
            }
          }
        ]
      }
    }
  },
  "required": [
    "id",
    "card_uuid",
    "resource_type",
    "capabilities",
    "representative_queries",
    "risk_level",
    "data_classes",
    "permissions_required",
    "pricing_model",
    "mcp_endpoint",
    "install_mode",
    "mcpb_url",
    "verification",
    "data_residency",
    "ard_document_url"
  ]
}
