{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "McpServerConfig",
  "description": "Optional private limits for this device's MCP server (`MM_HOME/mcp.json`).\nWhat an agent may do comes from the project's reviewed `agents:` block;\nthis file can only narrow it.",
  "type": "object",
  "properties": {
    "ceiling": {
      "description": "The most an agent may do on this device, per environment name or `*`.\nAn environment without an entry is limited only by the project.",
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/AgentAccessConfig"
      },
      "default": {}
    },
    "maximum_page_size": {
      "type": "integer",
      "format": "uint",
      "default": 50,
      "minimum": 0
    },
    "maximum_response_bytes": {
      "type": "integer",
      "format": "uint",
      "default": 524288,
      "minimum": 0
    },
    "principal": {
      "description": "The name audit records attribute agent requests to.",
      "type": "string",
      "default": "agent"
    },
    "request_timeout_ms": {
      "type": "integer",
      "format": "uint64",
      "default": 15000,
      "minimum": 0
    },
    "schema_version": {
      "type": "integer",
      "format": "uint32",
      "minimum": 0
    }
  },
  "$comment": "Generated from McpServerConfig; run ./scripts/generate-artifacts.sh. Do not edit.",
  "additionalProperties": false,
  "required": [
    "schema_version"
  ],
  "$defs": {
    "AccessLevel": {
      "description": "Access levels a repo grants per environment. Each includes the previous.",
      "oneOf": [
        {
          "description": "Plan, status, inspect, logs, and the Swarm node list.",
          "type": "string",
          "const": "view"
        },
        {
          "description": "`view` plus restart and job run, cancel, and retry.",
          "type": "string",
          "const": "operate"
        },
        {
          "description": "`operate` plus deploy, rollback, and team sync.",
          "type": "string",
          "const": "deploy"
        },
        {
          "description": "`deploy` plus exec, forward, secrets, emergency blocks, audit, and\nSwarm placement groups, storage, and ingress nodes.",
          "type": "string",
          "const": "admin"
        }
      ]
    },
    "AgentAccess": {
      "description": "What an agent may do in one environment.",
      "type": "object",
      "properties": {
        "exec": {
          "description": "Services the agent may run commands in: `true`, or a list of names.",
          "$ref": "#/$defs/ServiceSelection"
        },
        "level": {
          "description": "`view`, `operate`, or `deploy`. Agents are never `admin`.",
          "$ref": "#/$defs/AccessLevel"
        }
      },
      "additionalProperties": false,
      "required": [
        "level"
      ]
    },
    "AgentAccessConfig": {
      "description": "`production: view` or `local: { level: deploy, exec: true }`.",
      "anyOf": [
        {
          "$ref": "#/$defs/AccessLevel"
        },
        {
          "$ref": "#/$defs/AgentAccess"
        }
      ]
    },
    "ServiceSelection": {
      "description": "Services an add-on applies to: all of them, none, or a named list.",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        }
      ]
    }
  }
}
