{
  "$id": "https://dawmcp.com/schemas/provider-v1.json",
  "title": "DAWMCP provider manifest",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "schema": {
          "type": "string",
          "const": "https://dawmcp.com/schemas/provider-v1.json"
        },
        "id": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{1,39}$"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "homepage": {
          "type": "string",
          "format": "uri"
        },
        "license": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "contact": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "kind": {
          "type": "string",
          "const": "web"
        },
        "connection": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "browser-bridge"
            },
            "origins": {
              "minItems": 1,
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "required": [
            "type",
            "origins"
          ],
          "additionalProperties": false
        },
        "setup": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        }
      },
      "required": [
        "schema",
        "id",
        "name",
        "homepage",
        "contact",
        "kind",
        "connection"
      ],
      "additionalProperties": false
    },
    {
      "type": "object",
      "properties": {
        "schema": {
          "type": "string",
          "const": "https://dawmcp.com/schemas/provider-v1.json"
        },
        "id": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9-]{1,39}$"
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "homepage": {
          "type": "string",
          "format": "uri"
        },
        "license": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "contact": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "kind": {
          "type": "string",
          "enum": [
            "desktop",
            "web"
          ]
        },
        "versions": {
          "type": "object",
          "properties": {
            "app": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "surface": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            }
          },
          "required": [
            "app",
            "surface"
          ],
          "additionalProperties": false
        },
        "connection": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "local-mcp"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "auth": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "none"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "token-file"
                        },
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024
                        }
                      },
                      "required": [
                        "type",
                        "path"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "enable": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": [
                "type",
                "url",
                "auth"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "remote-mcp"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "auth": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "oauth"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "type",
                "url",
                "auth"
              ],
              "additionalProperties": false
            }
          ]
        },
        "operations": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "enum": [
              "read_daw_session",
              "control_daw_transport",
              "create_daw_track",
              "write_daw_midi",
              "import_daw_audio",
              "list_daw_plugins",
              "list_daw_track_plugins",
              "insert_daw_plugin",
              "read_daw_plugin_parameters",
              "set_daw_plugin_parameter"
            ]
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "support": {
                "type": "string",
                "enum": [
                  "experimental",
                  "validated"
                ]
              }
            },
            "required": [
              "tool",
              "support"
            ],
            "additionalProperties": false
          }
        },
        "session": {
          "type": "object",
          "properties": {
            "stableId": {
              "type": "boolean"
            },
            "revision": {
              "type": "boolean"
            },
            "writePreconditions": {
              "type": "boolean"
            },
            "idempotentRequests": {
              "type": "boolean"
            },
            "undoPerWrite": {
              "type": "boolean"
            },
            "changeEvents": {
              "type": "boolean"
            }
          },
          "required": [
            "stableId",
            "revision",
            "writePreconditions",
            "idempotentRequests",
            "undoPerWrite",
            "changeEvents"
          ],
          "additionalProperties": false
        },
        "frame": {
          "default": [],
          "maxItems": 7,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "meters",
              "tempos",
              "markers",
              "loop",
              "timeSelection",
              "editCursor",
              "playhead"
            ]
          }
        },
        "trackKinds": {
          "default": false,
          "type": "boolean"
        },
        "native": {
          "default": [],
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "tool": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "category": {
                "type": "string",
                "enum": [
                  "context",
                  "transport",
                  "composition",
                  "media",
                  "mixing",
                  "project"
                ]
              },
              "description": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              }
            },
            "required": [
              "tool",
              "category",
              "description"
            ],
            "additionalProperties": false
          }
        },
        "setup": {
          "minItems": 1,
          "maxItems": 10,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        }
      },
      "required": [
        "schema",
        "id",
        "name",
        "homepage",
        "contact",
        "kind",
        "versions",
        "connection",
        "operations",
        "session",
        "setup"
      ],
      "additionalProperties": false
    }
  ]
}
