name = "mcp_server_configuration"
description = "Interactive configuration for MCP Server service (Model Context Protocol interface)"
display_mode = "complete"
fallback_locale = "en-US"

# ============================================================================
# MCP SERVER SERVICE FORM - COMPOSED FROM FRAGMENTS
# ============================================================================
# This form uses fragment composition pattern for modular configuration
# All fragments are located in ./fragments/ subdirectory
# ============================================================================

# DEPLOYMENT MODE SELECTION
# Determines service resources and feature set (solo/multiuser/cicd/enterprise)
[[items]]
name = "deployment_mode_group"
type = "group"
title = "Deployment Configuration"
description = "Select deployment mode and database backend"
includes = ["fragments/deployment/mode-selection.toml", "fragments/deployment/database-backend-selection.toml"]

# WORKSPACE CONFIGURATION
# Workspace name, path, and context
[[items]]
name = "workspace_group"
type = "group"
title = "Workspace Settings"
description = "Configure workspace context for this MCP Server instance"
includes = ["fragments/workspace-section.toml"]

# SERVER CONFIGURATION
# HTTP server settings (host, port, workers, connections)
[[items]]
name = "server_group"
type = "group"
title = "Server Settings"
description = "Configure HTTP server for MCP Server"
includes = ["fragments/server-section.toml"]

# DATABASE BACKEND CONFIGURATION
# Conditional sections based on selected backend
[[items]]
name = "database_rocksdb_group"
type = "group"
title = "RocksDB Configuration"
description = "Configure RocksDB backend for MCP state"
condition = "database_backend_selection == 'rocksdb'"
includes = ["fragments/database-rocksdb-section.toml"]

[[items]]
name = "database_surrealdb_group"
type = "group"
title = "SurrealDB Configuration"
description = "Configure SurrealDB backend for MCP state"
condition = "database_backend_selection == 'surrealdb_embedded' || database_backend_selection == 'surrealdb_server'"
includes = ["fragments/database-surrealdb-section.toml"]

[[items]]
name = "database_postgres_group"
type = "group"
title = "PostgreSQL Configuration"
description = "Configure PostgreSQL backend for MCP state"
condition = "database_backend_selection == 'postgresql'"
includes = ["fragments/database-postgres-section.toml"]

# MCP-SPECIFIC: TOOLS CONFIGURATION
# Tool management, validation, caching, concurrent execution
[[items]]
name = "tools_group"
type = "group"
title = "Tools Configuration"
description = "Configure MCP tools, execution, and caching"
includes = ["fragments/mcp-server/tools-section.toml"]

# MCP-SPECIFIC: PROMPTS CONFIGURATION
# Custom prompt templates, versioning, caching
[[items]]
name = "prompts_group"
type = "group"
title = "Prompts Configuration"
description = "Configure custom prompt templates and management"
includes = ["fragments/mcp-server/prompts-section.toml"]

# MCP-SPECIFIC: RESOURCES CONFIGURATION
# Resource management, max size, caching, validation
[[items]]
name = "resources_group"
type = "group"
title = "Resources Configuration"
description = "Configure MCP resources and resource management"
includes = ["fragments/mcp-server/resources-section.toml"]

# MCP-SPECIFIC: SAMPLING CONFIGURATION
# AI model sampling, temperature, output tokens, caching
[[items]]
name = "sampling_group"
type = "group"
title = "Sampling Configuration"
description = "Configure AI model sampling and inference"
includes = ["fragments/mcp-server/sampling-section.toml"]

# MONITORING CONFIGURATION
# Metrics collection, health checks
[[items]]
name = "monitoring_group"
type = "group"
title = "Monitoring Configuration"
description = "Configure metrics and health checks"
includes = ["fragments/monitoring-section.toml"]

# LOGGING CONFIGURATION
# Log levels, formats, rotation
[[items]]
name = "logging_group"
type = "group"
title = "Logging Configuration"
description = "Configure logging behavior and output"
includes = ["fragments/logging-section.toml"]
