# MCP Server Sampling Configuration Fragment

[[elements]]
border_bottom = false
border_top = true
name = "sampling_section_header"
title = "🎲 Sampling Configuration"
type = "section_header"

[[elements]]
default = false
help = "Enable sampling capability for AI model inference"
name = "sampling_enabled"
nickel_path = ["sampling", "enabled"]
prompt = "Enable Sampling"
type = "confirm"

[[elements]]
condition = "sampling_enabled == true"
default = 4096
help = "Maximum tokens for sampling output (range: ${constraint.mcp_server.sampling.max_tokens.min}-${constraint.mcp_server.sampling.max_tokens.max})"
max = "${constraint.mcp_server.sampling.max_tokens.max}"
min = "${constraint.mcp_server.sampling.max_tokens.min}"
name = "sampling_max_tokens"
nickel_path = ["sampling", "max_tokens"]
prompt = "Max Tokens"
type = "number"

[[elements]]
condition = "sampling_enabled == true"
help = "Sampling model to use (e.g., gpt-4, claude-3)"
name = "sampling_model"
nickel_path = ["sampling", "model"]
placeholder = "gpt-4"
prompt = "Sampling Model"
type = "text"

[[elements]]
condition = "sampling_enabled == true"
default = 0.7
help = "Temperature for sampling (0.0-2.0, higher = more creative)"
max = 2.0
min = 0.0
name = "sampling_temperature"
nickel_path = ["sampling", "temperature"]
prompt = "Temperature"
type = "number"

[[elements]]
condition = "sampling_enabled == true"
default = true
help = "Enable sampling result caching"
name = "sampling_cache_enabled"
nickel_path = ["sampling", "cache", "enabled"]
prompt = "Enable Sampling Cache"
type = "confirm"

[[elements]]
condition = "sampling_enabled == true && sampling_cache_enabled == true"
default = 3600
help = "Sampling cache TTL in seconds (range: 60-3600)"
max = 3600
min = 60
name = "sampling_cache_ttl"
nickel_path = ["sampling", "cache", "ttl"]
prompt = "Cache TTL (seconds)"
type = "number"
