{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string"
    },
    "dxt_version": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "display_name": {
      "type": "string"
    },
    "version": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "long_description": {
      "type": "string"
    },
    "author": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email",
          "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "name"
      ],
      "additionalProperties": false
    },
    "repository": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "type",
        "url"
      ],
      "additionalProperties": false
    },
    "homepage": {
      "type": "string",
      "format": "uri"
    },
    "documentation": {
      "type": "string",
      "format": "uri"
    },
    "support": {
      "type": "string",
      "format": "uri"
    },
    "icon": {
      "type": "string"
    },
    "screenshots": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "server": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "python",
            "node",
            "binary"
          ]
        },
        "entry_point": {
          "type": "string"
        },
        "mcp_config": {
          "type": "object",
          "properties": {
            "command": {
              "type": "string"
            },
            "args": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "env": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "string"
              }
            },
            "platform_overrides": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "command": {
                    "type": "string"
                  },
                  "args": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "env": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": [
            "command"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "type",
        "entry_point",
        "mcp_config"
      ],
      "additionalProperties": false
    },
    "tools": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    },
    "tools_generated": {
      "type": "boolean"
    },
    "prompts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "arguments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "text"
        ],
        "additionalProperties": false
      }
    },
    "prompts_generated": {
      "type": "boolean"
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "license": {
      "type": "string"
    },
    "compatibility": {
      "type": "object",
      "properties": {
        "claude_desktop": {
          "type": "string"
        },
        "platforms": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "darwin",
              "win32",
              "linux"
            ]
          }
        },
        "runtimes": {
          "type": "object",
          "properties": {
            "python": {
              "type": "string"
            },
            "node": {
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": {}
    },
    "user_config": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "string",
              "number",
              "boolean",
              "directory",
              "file"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "default": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "multiple": {
            "type": "boolean"
          },
          "sensitive": {
            "type": "boolean"
          },
          "min": {
            "type": "number"
          },
          "max": {
            "type": "number"
          }
        },
        "required": [
          "type",
          "title",
          "description"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "dxt_version",
    "name",
    "version",
    "description",
    "author",
    "server"
  ],
  "additionalProperties": false
}