{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://venuemind.dev/schemas/venue-tool-manifest.schema.json",
  "title": "VenueMind Tool Manifest",
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "name",
      "title",
      "description",
      "contractVersion",
      "authorization",
      "limits",
      "inputSchema",
      "outputSchema",
      "exampleInput",
      "errors"
    ],
    "properties": {
      "name": {
        "type": "string",
        "pattern": "^venue\\.[a-z0-9_]+$"
      },
      "title": {
        "type": "string",
        "minLength": 1
      },
      "description": {
        "type": "string",
        "minLength": 1
      },
      "contractVersion": {
        "type": "string",
        "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
      },
      "annotations": {
        "type": "object"
      },
      "authorization": {
        "type": "object",
        "required": [
          "requiredScope"
        ],
        "properties": {
          "requiredScope": {
            "enum": [
              "venue:read",
              "venue:propose",
              "venue:comment",
              "venue:simulate",
              "venue:operate",
              "venue:export"
            ]
          }
        },
        "additionalProperties": false
      },
      "limits": {
        "type": "object",
        "required": [
          "maximumInputBytes",
          "maximumOutputBytes"
        ],
        "properties": {
          "maximumInputBytes": {
            "type": "integer",
            "minimum": 1
          },
          "maximumOutputBytes": {
            "type": "integer",
            "minimum": 1
          }
        },
        "additionalProperties": false
      },
      "inputSchema": {
        "type": "object"
      },
      "outputSchema": {
        "type": "object"
      },
      "exampleInput": {
        "type": "object"
      },
      "errors": {
        "type": "array",
        "minItems": 1,
        "uniqueItems": true,
        "items": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "additionalProperties": false
  }
}
