class

MCP::Protocol::EnumSchemaBuilder

Inherits Reference < Object

Fluent builder for EnumSchema.

Call titled before build to produce a oneOf variant; call multi_select to produce an array-typed multi-select.

Constructors

new(values : Array(String))
Source

Instance methods

build
Source
description(val : String) : self
Source
max_items(val : Int64) : self
Source
min_items(val : Int64) : self
Source
multi_select

Switch to multi-select mode (type "array" with minItems/maxItems).

Source
title(val : String) : self
Source
titled

Produce a titled variant (oneOf) instead of untitled (enum).

Source
with_default(val : String) : self

Set the default value. Must be one of the enum values.

Source