{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/multi-agent-ecosystem/multi-agent-pipeline/pipeline/schemas/toolkit-path-params.schema.json",
  "title": "Toolkit path parameters",
  "description": "Shape of toolkit-path-params.json: per multi-agent-mcp tool, the parameters it writes to and the filesystem paths it reads, as the toolkit's tool-manifest.json declares them. unattended_policy.py confines exactly these; a nested parameter is written as a dotted path with [] for an array item (modules[].report_file).",
  "type": "object",
  "additionalProperties": false,
  "required": ["$comment", "toolkitVersion", "tools"],
  "$defs": {
    "params": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[A-Za-z0-9_]+(\\[\\])?(\\.[A-Za-z0-9_]+(\\[\\])?)*$"
      },
      "uniqueItems": true
    }
  },
  "properties": {
    "$comment": { "type": "string" },
    "toolkitVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+" },
    "tools": {
      "type": "object",
      "propertyNames": { "pattern": "^[a-z0-9_]+$" },
      "additionalProperties": {
        "type": "object",
        "additionalProperties": false,
        "required": ["writes", "reads"],
        "properties": {
          "writes": { "$ref": "#/$defs/params" },
          "reads": { "$ref": "#/$defs/params" }
        }
      }
    }
  }
}
