{
  "$ref": "#/definitions/tools-advertise",
  "definitions": {
    "tools-advertise": {
      "type": "object",
      "properties": {
        "v": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+$"
        },
        "id": {
          "type": "string",
          "minLength": 10,
          "maxLength": 64
        },
        "type": {
          "type": "string",
          "const": "tools.advertise"
        },
        "ts": {
          "type": "integer",
          "exclusiveMinimum": 0
        },
        "sid": {
          "type": "string",
          "minLength": 16,
          "maxLength": 128
        },
        "replyTo": {
          "type": "string",
          "minLength": 10,
          "maxLength": 64
        },
        "payload": {
          "type": "object",
          "properties": {
            "tools": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9_.:-]+$"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "inputSchema": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "location": {
                    "type": "string",
                    "enum": [
                      "hub",
                      "surface"
                    ]
                  },
                  "write": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "name",
                  "description",
                  "inputSchema",
                  "location"
                ],
                "additionalProperties": false
              },
              "maxItems": 100
            }
          },
          "required": [
            "tools"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "v",
        "id",
        "type",
        "ts",
        "payload"
      ],
      "additionalProperties": true
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schwaizer.ch/ocp/schemas/1.0/tools-advertise.json"
}
