Helper module used to build StringSchema structure: a text field of an
elicitation form.
(MCP protocol: 2025-11-25)
Short example:
%StringSchema{}
|> StringSchema.title("Email")
|> StringSchema.format("email")
|> StringSchema.build()Result:
%{type: "string", title: "Email", format: "email"}Specification: StringSchema
Fields
| Field | Setter | Type | Required |
|---|---|---|---|
title | title/2 | string | no |
description | description/2 | string | no |
minLength | min_length/2 | non-negative integer | no |
maxLength | max_length/2 | non-negative integer | no |
format | format/2 | "email", "uri", "date", "date-time" | no |
default | default/2 | string | no |
Summary
Types
@type t() :: %OzMcp.Structs.StringSchema{ default: String.t() | nil, description: String.t() | nil, format: term() | nil, maxLength: non_neg_integer() | nil, minLength: non_neg_integer() | nil, title: String.t() | nil }
Functions
@spec max_length(t(), non_neg_integer() | nil) :: t()
@spec min_length(t(), non_neg_integer() | nil) :: t()