{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sealgate-ai/json-schema/sealgate-ai-autoconfig-refine-request-schema.json",
  "title": "AutoconfigRefineRequest",
  "description": "Request body for refining AI autoconfig results with user feedback.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sealgate-ai-config-perms-api-openapi.yml#/components/schemas/AutoconfigRefineRequest",
  "properties": {
    "server": {
      "type": "string",
      "title": "Server",
      "description": "MCP server name"
    },
    "tools": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Tools",
      "description": "Tool names to re-classify"
    },
    "resources": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Resources",
      "description": "Resource names to re-classify"
    },
    "prompts": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Prompts",
      "description": "Prompt names to re-classify"
    },
    "current_flags": {
      "additionalProperties": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "object",
      "title": "Current Flags",
      "description": "Map of '<type>:<item_name>' (e.g. 'tool:search') -> current permission flags to give the LLM as baseline. Namespacing by type avoids collisions when a tool and resource share the same name. Flat name-only keys are still accepted for back-compat."
    },
    "feedback": {
      "type": "string",
      "title": "Feedback",
      "description": "User feedback/instructions to adjust classifications"
    }
  },
  "type": "object",
  "required": [
    "server",
    "feedback"
  ]
}