{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "wtfp.tools/v1",
  "title": "WTF-P logical tool registry",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "tools"],
  "properties": {
    "schema": { "const": "wtfp.tools/v1" },
    "tools": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "implementation", "legacyName", "deterministic", "effects"],
        "properties": {
          "id": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)+$" },
          "implementation": { "type": "string", "pattern": "^wtfp://tools/" },
          "legacyName": { "type": "string", "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$" },
          "deterministic": { "type": "boolean" },
          "effects": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
        }
      }
    }
  }
}
