Module elicitation

Module elicitation 

Source
Expand description

MCP Protocol Elicitation Types (Spec-Compliant)

This module provides the exact types defined in the MCP 2025-06-18 specification for elicitation/create requests and responses. These types are used for the protocol layer and must maintain 100% spec compliance.

Structs§

ArraySchemaBuilder
Builder for array schemas
BooleanSchema
Boolean schema definition
BooleanSchemaBuilder
Builder for boolean schemas
ElicitationCreateRequest
Elicitation create request per MCP 2025-06-18 specification Method: “elicitation/create”
ElicitationCreateResult
Elicitation response per MCP 2025-06-18 specification
ElicitationSchema
Restricted schema for elicitation requests Only allows flat objects with primitive properties
EnumSchema
Enum schema definition (string enumerations)
EnumSchemaBuilder
Builder for enum schemas
NumberSchema
Number schema definition (supports both number and integer)
NumberSchemaBuilder
Builder for number schemas
ObjectSchema
Object schema definition (for building objects)
ObjectSchemaBuilder
Builder for object schemas
StringSchema
String schema definition
StringSchemaBuilder
Builder for string schemas

Enums§

ElicitationAction
User action in response to elicitation
ElicitationValue
Values that can be submitted in elicitation responses Limited to string, integer, and boolean per spec
PrimitiveSchemaDefinition
Primitive schema definitions allowed in elicitation Restricted to only primitive types without nesting
StringFormat
Supported string formats per MCP spec

Functions§

array
Create an array schema
boolean
Create a boolean field with title - beautiful ergonomics!
boolean_builder
Create a boolean schema without title (for advanced usage)
checkbox
Alias for boolean() - checkbox semantic is clearer for UI
choices
Alias for options() - terser naming
enum_of
Create an enum schema
integer
Create an integer field with title - beautiful ergonomics!
integer_builder
Create an integer schema without title (for advanced usage)
integer_field
Alias for integer() - field semantic is clearer for UI
number
Create a number field with title - beautiful ergonomics!
number_builder
Create a number schema without title (for advanced usage)
number_field
Alias for number() - field semantic is clearer for UI
object
Create an object schema
options
World-class DX: Create enum schema from array slice (no Vec required!)
string
Create a string field with title - beautiful ergonomics!
string_builder
Create a string schema without title (for advanced usage)
text
Alias for string() - text semantic is clearer for UI