{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "Executable": {
      "properties": {
        "service_binary": {
          "type": "string"
        },
        "revision": {
          "type": "string"
        },
        "configuration": {
          "type": "string"
        }
      },
      "type": "object",
      "required": [
        "service_binary",
        "revision",
        "configuration"
      ],
      "description": "Executable is what the service runs a release with, filled at bootstrap and part of the release's identity: the running service binary, its revision, and the canonical configuration the tool was prepared under."
    },
    "Role": {
      "properties": {
        "name": {
          "type": "string"
        },
        "doc": {
          "type": "string"
        },
        "required": {
          "type": "boolean"
        },
        "dynamic": {
          "type": "boolean"
        },
        "accepts": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "yields": {
          "type": "string"
        }
      },
      "type": "object",
      "required": [
        "name",
        "doc"
      ],
      "description": "Role is one declared input or output of a tool."
    }
  },
  "properties": {
    "name": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "doc": {
      "type": "string"
    },
    "class": {
      "type": "string"
    },
    "inputs": {
      "items": {
        "$ref": "#/$defs/Role"
      },
      "type": "array"
    },
    "outputs": {
      "items": {
        "$ref": "#/$defs/Role"
      },
      "type": "array"
    },
    "effects": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "recipe_doc": {
      "type": "string"
    },
    "deterministic": {
      "type": "boolean"
    },
    "egress": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "executable": {
      "$ref": "#/$defs/Executable"
    }
  },
  "type": "object",
  "required": [
    "name",
    "version",
    "doc",
    "class",
    "inputs",
    "outputs",
    "effects",
    "recipe_doc",
    "deterministic",
    "egress",
    "executable"
  ],
  "title": "ToolDescription",
  "description": "ToolDescription is the retained content of a release's artifact space under the world's tools: what the tool is, what it takes and yields, whether running it twice on one valuation is expected to agree, which hosts it may reach, and how the service executes it."
}
