{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://jabbertoon.com/schemas/mcp-tools.schema.json",
 "title": "Jabbertoon tool list",
 "description": "The one list of Jabbertoon's tools for AI assistants and programs (https://jabbertoon.com/schemas/mcp-tools.json): each tool's name, what it does, its input and output as JSON Schemas, whether it only reads, the doors it is offered on (mcp: https://jabbertoon.com/mcp; rest: https://jabbertoon.com/api/<name>; local: the tool on your own computer) and an example. The MCP tool lists, the REST description (/openapi.json) and the tool table on /for-ai/ are made from it.",
 "type": "object",
 "required": [
  "version",
  "tools"
 ],
 "additionalProperties": false,
 "properties": {
  "version": {
   "const": 1
  },
  "tools": {
   "type": "array",
   "minItems": 1,
   "items": {
    "$ref": "#/$defs/tool"
   }
  }
 },
 "$defs": {
  "tool": {
   "type": "object",
   "required": [
    "name",
    "title",
    "description",
    "inputSchema",
    "outputSchema",
    "annotations",
    "doors",
    "example"
   ],
   "additionalProperties": false,
   "properties": {
    "name": {
     "type": "string",
     "pattern": "^[a-z][a-z0-9_]{0,63}$"
    },
    "title": {
     "type": "string",
     "minLength": 1
    },
    "description": {
     "type": "string",
     "minLength": 1
    },
    "inputSchema": {
     "type": "object",
     "required": [
      "type"
     ],
     "properties": {
      "type": {
       "const": "object"
      }
     }
    },
    "outputSchema": {
     "type": "object",
     "required": [
      "type"
     ],
     "properties": {
      "type": {
       "const": "object"
      }
     }
    },
    "annotations": {
     "type": "object",
     "required": [
      "readOnlyHint"
     ],
     "additionalProperties": false,
     "properties": {
      "readOnlyHint": {
       "type": "boolean"
      }
     }
    },
    "doors": {
     "type": "array",
     "minItems": 1,
     "uniqueItems": true,
     "items": {
      "enum": [
       "mcp",
       "rest",
       "local"
      ]
     }
    },
    "example": {
     "type": "object",
     "required": [
      "arguments",
      "summary"
     ],
     "additionalProperties": false,
     "properties": {
      "arguments": {
       "type": "object"
      },
      "summary": {
       "type": "string",
       "minLength": 1
      }
     }
    }
   }
  }
 }
}
