OzMcp.Structs.BooleanSchema (OzMcp v0.9.0)

Copy Markdown View Source

Helper module used to build BooleanSchema structure: a yes/no field of an elicitation form.

(MCP protocol: 2025-11-25)

Short example:

%BooleanSchema{}
  |> BooleanSchema.title("Subscribe")
  |> BooleanSchema.default(true)
  |> BooleanSchema.build()

Result:

%{type: "boolean", title: "Subscribe", default: true}

Specification: BooleanSchema

Fields

FieldSetterTypeRequired
titletitle/2stringno
descriptiondescription/2stringno
defaultdefault/2booleanno

Summary

Types

t()

@type t() :: %OzMcp.Structs.BooleanSchema{
  default: boolean() | nil,
  description: String.t() | nil,
  title: String.t() | nil
}

Functions

build(struct)

@spec build(t()) :: map()

default(struct, value)

@spec default(t(), boolean() | nil) :: t()

description(struct, value)

@spec description(t(), String.t() | nil) :: t()

title(struct, value)

@spec title(t(), String.t() | nil) :: t()