{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "MikrotikConfig",
  "type": "object",
  "properties": {
    "serviceProbes": {
      "default": {
        "scheduled": {},
        "targets": {},
        "timeoutMs": 5000
      },
      "type": "object",
      "properties": {
        "scheduled": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        },
        "targets": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^[a-z\\d_-]{1,64}$"
          },
          "additionalProperties": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": ["dns", "tcp", "tls", "https"]
              },
              "host": {
                "type": "string",
                "minLength": 1,
                "maxLength": 253,
                "pattern": "^[a-z\\d](?:[a-z\\d.-]*[a-z\\d])?$"
              },
              "port": {
                "default": 443,
                "type": "integer",
                "minimum": 1,
                "maximum": 65535
              },
              "path": {
                "default": "/health",
                "type": "string",
                "maxLength": 1024
              },
              "addresses": {
                "minItems": 1,
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": ["kind", "host", "port", "path", "addresses"],
            "additionalProperties": false
          }
        },
        "timeoutMs": {
          "default": 5000,
          "type": "integer",
          "minimum": 100,
          "maximum": 10000
        }
      },
      "required": ["scheduled", "targets", "timeoutMs"],
      "additionalProperties": false
    },
    "devices": {
      "default": {
        "default": {
          "host": "127.0.0.1",
          "username": "admin",
          "password": "",
          "port": 22,
          "timeoutMs": 10000,
          "tags": []
        }
      },
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "object",
        "properties": {
          "host": {
            "default": "127.0.0.1",
            "type": "string"
          },
          "fallbackHosts": {
            "maxItems": 7,
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "ipv4",
                  "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"
                },
                {
                  "type": "string",
                  "format": "ipv6",
                  "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"
                }
              ]
            }
          },
          "username": {
            "default": "admin",
            "type": "string"
          },
          "password": {
            "default": "",
            "type": "string"
          },
          "bandwidthAuth": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string",
                "minLength": 1
              },
              "password": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32
              }
            },
            "required": ["username", "password"],
            "additionalProperties": false
          },
          "port": {
            "default": 22,
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "keyFilename": {
            "type": "string"
          },
          "privateKey": {
            "type": "string"
          },
          "keyPassphrase": {
            "type": "string"
          },
          "passwordFrom": {
            "type": "string",
            "pattern": "^(?:env:[A-Za-z_][A-Za-z0-9_]*|file:.+|keyring:[A-Za-z0-9][A-Za-z0-9._@-]{0,63}\\/[A-Za-z0-9][A-Za-z0-9._@-]{0,63})$"
          },
          "keyPassphraseFrom": {
            "type": "string",
            "pattern": "^(?:env:[A-Za-z_][A-Za-z0-9_]*|file:.+|keyring:[A-Za-z0-9][A-Za-z0-9._@-]{0,63}\\/[A-Za-z0-9][A-Za-z0-9._@-]{0,63})$"
          },
          "sshAgent": {
            "type": "boolean"
          },
          "hostKeySha256": {
            "type": "string",
            "pattern": "^(?:SHA256:)?[A-Za-z0-9+/]{43}=?$"
          },
          "timeoutMs": {
            "default": 10000,
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "jumpVia": {
            "type": "string"
          },
          "jumpHost": {
            "type": "object",
            "properties": {
              "host": {
                "type": "string"
              },
              "port": {
                "default": 22,
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "username": {
                "default": "admin",
                "type": "string"
              },
              "password": {
                "type": "string"
              },
              "keyFilename": {
                "type": "string"
              },
              "privateKey": {
                "type": "string"
              },
              "keyPassphrase": {
                "type": "string"
              },
              "timeoutMs": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": ["host", "port", "username"],
            "additionalProperties": false
          },
          "mac": {
            "type": "string"
          },
          "sourceMac": {
            "type": "string"
          },
          "macHost": {
            "type": "string"
          },
          "macPort": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "api": {
            "type": "boolean"
          },
          "apiPort": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "apiInsecureTls": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "tags": {
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "disabled": {
            "type": "boolean"
          }
        },
        "required": ["host", "username", "password", "port", "timeoutMs", "tags"],
        "additionalProperties": false
      }
    },
    "defaultDevice": {
      "default": "default",
      "type": "string"
    },
    "mcp": {
      "default": {
        "transport": "stdio",
        "host": "0.0.0.0",
        "port": 8000,
        "allowedHosts": "",
        "allowedOrigins": "",
        "corsOrigins": "",
        "sessionIdleTimeout": 86400000,
        "toolPageSize": 0,
        "toolSurface": "auto",
        "semanticSearch": true,
        "coreTools": "",
        "appViews": false,
        "capabilityGating": "annotate"
      },
      "type": "object",
      "properties": {
        "transport": {
          "default": "stdio",
          "type": "string",
          "enum": ["stdio", "sse", "streamable-http"]
        },
        "host": {
          "default": "0.0.0.0",
          "type": "string"
        },
        "port": {
          "default": 8000,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "allowedHosts": {
          "default": "",
          "type": "string"
        },
        "allowedOrigins": {
          "default": "",
          "type": "string"
        },
        "corsOrigins": {
          "default": "",
          "type": "string"
        },
        "sessionIdleTimeout": {
          "default": 86400000,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "toolPageSize": {
          "default": 0,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "toolSurface": {
          "default": "auto",
          "type": "string",
          "enum": ["auto", "full", "core"]
        },
        "semanticSearch": {
          "default": true,
          "type": "boolean"
        },
        "coreTools": {
          "default": "",
          "type": "string"
        },
        "appViews": {
          "default": false,
          "type": "boolean"
        },
        "capabilityGating": {
          "default": "annotate",
          "type": "string",
          "enum": ["off", "annotate", "filter"]
        }
      },
      "required": [
        "transport",
        "host",
        "port",
        "allowedHosts",
        "allowedOrigins",
        "corsOrigins",
        "sessionIdleTimeout",
        "toolPageSize",
        "toolSurface",
        "semanticSearch",
        "coreTools",
        "appViews",
        "capabilityGating"
      ],
      "additionalProperties": false
    },
    "s3": {
      "type": "object",
      "properties": {
        "accessKeyId": {
          "type": "string"
        },
        "secretAccessKey": {
          "type": "string"
        },
        "sessionToken": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "endpoint": {
          "type": "string"
        },
        "bucket": {
          "type": "string"
        },
        "prefix": {
          "default": "",
          "type": "string"
        },
        "presignExpiresIn": {
          "default": 3600,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": ["prefix", "presignExpiresIn"],
      "additionalProperties": false
    },
    "dashboard": {
      "default": {
        "enabled": false,
        "host": "0.0.0.0",
        "port": 9090,
        "dbPath": "/Users/alimaster/.mikrotik-mcp/events.db",
        "maxEvents": 100000,
        "captureBody": true,
        "redactInput": false,
        "maxBodyBytes": 16384,
        "feedLimit": 200,
        "terminal": true,
        "files": true
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "host": {
          "default": "0.0.0.0",
          "type": "string"
        },
        "port": {
          "default": 9090,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "dbPath": {
          "default": "/Users/alimaster/.mikrotik-mcp/events.db",
          "type": "string"
        },
        "maxEvents": {
          "default": 100000,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "captureBody": {
          "default": true,
          "type": "boolean"
        },
        "redactInput": {
          "default": false,
          "type": "boolean"
        },
        "maxBodyBytes": {
          "default": 16384,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "token": {
          "type": "string"
        },
        "feedLimit": {
          "default": 200,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 10000
        },
        "terminal": {
          "default": true,
          "type": "boolean"
        },
        "files": {
          "default": true,
          "type": "boolean"
        }
      },
      "required": [
        "enabled",
        "host",
        "port",
        "dbPath",
        "maxEvents",
        "captureBody",
        "redactInput",
        "maxBodyBytes",
        "feedLimit",
        "terminal",
        "files"
      ],
      "additionalProperties": false
    },
    "alerts": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": true,
          "type": "boolean"
        },
        "rules": {
          "default": [],
          "type": "array",
          "items": {}
        },
        "channels": {
          "default": {},
          "type": "object",
          "properties": {
            "slack": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": ["url"],
              "additionalProperties": false
            },
            "discord": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": ["url"],
              "additionalProperties": false
            },
            "ntfy": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "token": {
                  "type": "string"
                }
              },
              "required": ["url"],
              "additionalProperties": false
            },
            "telegram": {
              "type": "object",
              "properties": {
                "token": {
                  "type": "string",
                  "minLength": 1
                },
                "chatId": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": ["token", "chatId"],
              "additionalProperties": false
            },
            "email": {
              "type": "object",
              "properties": {
                "host": {
                  "type": "string",
                  "minLength": 1
                },
                "port": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "secure": {
                  "type": "boolean"
                },
                "username": {
                  "type": "string"
                },
                "password": {
                  "type": "string"
                },
                "from": {
                  "type": "string",
                  "minLength": 3
                },
                "to": {
                  "type": "string",
                  "minLength": 3
                }
              },
              "required": ["host", "from", "to"],
              "additionalProperties": false
            },
            "webhook": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "method": {
                  "type": "string"
                },
                "headers": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string"
                  }
                }
              },
              "required": ["url"],
              "additionalProperties": false
            },
            "mcp": {
              "type": "object",
              "properties": {},
              "additionalProperties": false
            }
          },
          "additionalProperties": false
        },
        "maxHistory": {
          "default": 5000,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "digest": {
          "type": "object",
          "properties": {
            "enabled": {
              "default": false,
              "type": "boolean"
            },
            "hour": {
              "default": 8,
              "type": "integer",
              "minimum": 0,
              "maximum": 23
            },
            "channels": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "enum": ["slack", "discord", "ntfy", "telegram", "email", "webhook", "mcp"]
              }
            }
          },
          "required": ["enabled", "hour", "channels"],
          "additionalProperties": false
        }
      },
      "required": ["enabled", "rules", "channels", "maxHistory"],
      "additionalProperties": false
    },
    "audit": {
      "type": "object",
      "properties": {
        "syslog": {
          "type": "object",
          "properties": {
            "host": {
              "type": "string",
              "minLength": 1
            },
            "port": {
              "default": 514,
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "protocol": {
              "default": "udp",
              "type": "string",
              "enum": ["udp", "tcp"]
            },
            "facility": {
              "default": 13,
              "type": "integer",
              "minimum": 0,
              "maximum": 23
            },
            "appName": {
              "default": "mikrotik-mcp",
              "type": "string"
            },
            "includeInput": {
              "default": false,
              "type": "boolean"
            },
            "writesOnly": {
              "default": false,
              "type": "boolean"
            }
          },
          "required": [
            "host",
            "port",
            "protocol",
            "facility",
            "appName",
            "includeInput",
            "writesOnly"
          ],
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "approvals": {
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "minRisk": {
          "default": "DESTRUCTIVE",
          "type": "string",
          "enum": ["WRITE", "DESTRUCTIVE", "DANGEROUS"]
        },
        "ttlMinutes": {
          "default": 30,
          "type": "integer",
          "minimum": 1,
          "maximum": 1440
        },
        "notify": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "enum": ["slack", "discord", "ntfy", "telegram", "email", "webhook", "mcp"]
          }
        }
      },
      "required": ["enabled", "minRisk", "ttlMinutes", "notify"],
      "additionalProperties": false
    },
    "vouchers": {
      "type": "object",
      "properties": {
        "issue": {
          "type": "object",
          "properties": {
            "token": {
              "type": "string",
              "minLength": 16
            },
            "tokenFrom": {
              "type": "string",
              "pattern": "^(?:env:[A-Za-z_][A-Za-z0-9_]*|file:.+|keyring:[A-Za-z0-9][A-Za-z0-9._@-]{0,63}\\/[A-Za-z0-9][A-Za-z0-9._@-]{0,63})$"
            },
            "device": {
              "type": "string"
            },
            "profile": {
              "type": "string"
            },
            "uptimeLimit": {
              "type": "string",
              "pattern": "^\\d+[wdhms](?:\\d+[wdhms])*$"
            },
            "batch": {
              "default": "sold",
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,30}$"
            },
            "codePrefix": {
              "default": "g",
              "type": "string",
              "pattern": "^[A-Za-z0-9]{0,6}$"
            },
            "maxPerMinute": {
              "default": 30,
              "type": "integer",
              "minimum": 1,
              "maximum": 600
            }
          },
          "required": ["batch", "codePrefix", "maxPerMinute"],
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "gitMirror": {
      "type": "object",
      "properties": {
        "dir": {
          "type": "string",
          "minLength": 1
        },
        "commit": {
          "default": true,
          "type": "boolean"
        },
        "push": {
          "default": false,
          "type": "boolean"
        },
        "sortSections": {
          "default": false,
          "type": "boolean"
        },
        "author": {
          "type": "string"
        }
      },
      "required": ["dir", "commit", "push", "sortSections"],
      "additionalProperties": false
    },
    "flows": {
      "default": {
        "enabled": false,
        "port": 2055,
        "db": "/Users/alimaster/.mikrotik-mcp/flows.db",
        "retentionHours": 24,
        "rollupDays": 30,
        "maxRows": 2000000
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "port": {
          "default": 2055,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "db": {
          "default": "/Users/alimaster/.mikrotik-mcp/flows.db",
          "type": "string"
        },
        "retentionHours": {
          "default": 24,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "rollupDays": {
          "default": 30,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "maxRows": {
          "default": 2000000,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": ["enabled", "port", "db", "retentionHours", "rollupDays", "maxRows"],
      "additionalProperties": false
    },
    "policy": {
      "default": {
        "paths": ["./mikrotik-policies/*.yaml"],
        "includeStarterPack": true
      },
      "type": "object",
      "properties": {
        "paths": {
          "default": ["./mikrotik-policies/*.yaml"],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "includeStarterPack": {
          "default": true,
          "type": "boolean"
        }
      },
      "required": ["paths", "includeStarterPack"],
      "additionalProperties": false
    },
    "schedules": {
      "default": {
        "enabled": false,
        "jobs": [],
        "concurrency": 4,
        "timeoutMs": 600000,
        "jitterMs": 3000,
        "tickSeconds": 30,
        "retainDays": 90
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "jobs": {
          "default": [],
          "type": "array",
          "items": {}
        },
        "concurrency": {
          "default": 4,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 64
        },
        "timeoutMs": {
          "default": 600000,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "jitterMs": {
          "default": 3000,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "tickSeconds": {
          "default": 30,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "retainDays": {
          "default": 90,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "enabled",
        "jobs",
        "concurrency",
        "timeoutMs",
        "jitterMs",
        "tickSeconds",
        "retainDays"
      ],
      "additionalProperties": false
    },
    "attacks": {
      "default": {
        "enabled": false,
        "mode": "detect",
        "pollSeconds": 120,
        "windowMinutes": 10,
        "concurrency": 4,
        "minConfidence": "high",
        "blockTimeout": "1h",
        "maxBlocksPerHour": 6,
        "neverBlock": [],
        "autoRespondTo": ["brute-force", "credential-spray"],
        "learningDays": 7,
        "readScanList": true,
        "retainDays": 90
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "mode": {
          "default": "detect",
          "type": "string",
          "enum": ["detect", "respond"]
        },
        "pollSeconds": {
          "default": 120,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "windowMinutes": {
          "default": 10,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "concurrency": {
          "default": 4,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 32
        },
        "minConfidence": {
          "default": "high",
          "type": "string",
          "enum": ["medium", "high", "confirmed"]
        },
        "blockTimeout": {
          "default": "1h",
          "type": "string"
        },
        "maxBlocksPerHour": {
          "default": 6,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "neverBlock": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "autoRespondTo": {
          "default": ["brute-force", "credential-spray"],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "learningDays": {
          "default": 7,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "readScanList": {
          "default": true,
          "type": "boolean"
        },
        "retainDays": {
          "default": 90,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "enabled",
        "mode",
        "pollSeconds",
        "windowMinutes",
        "concurrency",
        "minConfidence",
        "blockTimeout",
        "maxBlocksPerHour",
        "neverBlock",
        "autoRespondTo",
        "learningDays",
        "readScanList",
        "retainDays"
      ],
      "additionalProperties": false
    },
    "ssh": {
      "default": {
        "keepAlive": true,
        "keepAliveInterval": 10000,
        "idleTimeout": 30000
      },
      "type": "object",
      "properties": {
        "keepAlive": {
          "default": true,
          "type": "boolean"
        },
        "keepAliveInterval": {
          "default": 10000,
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "idleTimeout": {
          "default": 30000,
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": ["keepAlive", "keepAliveInterval", "idleTimeout"],
      "additionalProperties": false
    },
    "readOnly": {
      "default": false,
      "type": "boolean"
    },
    "verifyWrites": {
      "default": true,
      "type": "boolean"
    },
    "access": {
      "default": {
        "enabled": false,
        "devices": [],
        "denyDevices": [],
        "tools": [],
        "denyTools": []
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "maxRisk": {
          "type": "string",
          "enum": ["READ", "WRITE", "WRITE_IDEMPOTENT", "DESTRUCTIVE", "DANGEROUS"]
        },
        "devices": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "denyDevices": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tools": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "denyTools": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "label": {
          "type": "string"
        }
      },
      "required": ["enabled", "devices", "denyDevices", "tools", "denyTools"],
      "additionalProperties": false
    },
    "tools": {
      "default": {
        "enabledModules": [],
        "disabledModules": [],
        "enabledGroups": [],
        "disabledGroups": []
      },
      "type": "object",
      "properties": {
        "enabledModules": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "disabledModules": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "enabledGroups": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "disabledGroups": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": ["enabledModules", "disabledModules", "enabledGroups", "disabledGroups"],
      "additionalProperties": false
    },
    "memory": {
      "default": {
        "enabled": true,
        "dbPath": "/Users/alimaster/.mikrotik-mcp/memory.db"
      },
      "type": "object",
      "properties": {
        "enabled": {
          "default": true,
          "type": "boolean"
        },
        "dbPath": {
          "default": "/Users/alimaster/.mikrotik-mcp/memory.db",
          "type": "string"
        }
      },
      "required": ["enabled", "dbPath"],
      "additionalProperties": false
    },
    "backupDir": {
      "type": "string"
    },
    "disableUpdateCheck": {
      "default": false,
      "type": "boolean"
    },
    "logLevel": {
      "default": "error",
      "type": "string",
      "enum": ["error", "warn", "info", "debug"]
    }
  },
  "required": [
    "serviceProbes",
    "devices",
    "defaultDevice",
    "mcp",
    "dashboard",
    "flows",
    "policy",
    "schedules",
    "attacks",
    "ssh",
    "readOnly",
    "verifyWrites",
    "access",
    "tools",
    "memory",
    "disableUpdateCheck",
    "logLevel"
  ],
  "additionalProperties": false
}
