Skip to content

Commit 85a5ccf

Browse files
committed
add missing type and mode KDoc properties for schema and elicitation classes
1 parent e647f13 commit 85a5ccf

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/elicitation.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public data class ElicitRequest(override val params: ElicitRequestParams) : Serv
4646
* Represents the parameters for an `elicitation/create` request.
4747
*
4848
* Implementations: [ElicitRequestFormParams], [ElicitRequestURLParams].
49+
*
50+
* @property message The message to present to the user describing what information is being requested.
4951
*/
5052
@Serializable(with = ElicitRequestParamsSerializer::class)
5153
public sealed interface ElicitRequestParams : RequestParams {
@@ -111,6 +113,7 @@ public fun ElicitRequestParams(
111113
* later via `tasks/result`.
112114
* @property requestedSchema A restricted subset of JSON Schema. Only top-level properties
113115
* are allowed, without nesting.
116+
* @property mode The elicitation mode discriminator, always `"form"`.
114117
* @property meta Optional metadata. May include a progressToken for out-of-band progress notifications.
115118
*/
116119
@Serializable
@@ -138,6 +141,7 @@ public data class ElicitRequestFormParams(
138141
* @property task If specified, the caller is requesting task-augmented execution. The request
139142
* will return a [CreateTaskResult] immediately, and the actual result can be retrieved
140143
* later via `tasks/result`.
144+
* @property mode The elicitation mode discriminator, always `"url"`.
141145
* @property meta Optional metadata. May include a progressToken for out-of-band progress notifications.
142146
*/
143147
@Serializable

kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/schema.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public sealed interface PrimitiveSchemaDefinition
2424
* @property minLength Minimum string length.
2525
* @property maxLength Maximum string length.
2626
* @property format Optional format constraint (e.g., email, URI, date).
27+
* @property type JSON Schema type discriminator, always `"string"`.
2728
* @property default Optional default value.
2829
*/
2930
@Serializable
@@ -72,6 +73,7 @@ public sealed interface NumberSchemaDefinition : PrimitiveSchemaDefinition
7273
* @property description Optional description for the field.
7374
* @property minimum Minimum allowed value.
7475
* @property maximum Maximum allowed value.
76+
* @property type JSON Schema type discriminator, always `"integer"`.
7577
* @property default Optional default value.
7678
*/
7779
@Serializable
@@ -93,6 +95,7 @@ public data class IntegerSchema(
9395
* @property description Optional description for the field.
9496
* @property minimum Minimum allowed value.
9597
* @property maximum Maximum allowed value.
98+
* @property type JSON Schema type discriminator, always `"number"`.
9699
* @property default Optional default value.
97100
*/
98101
@Serializable
@@ -112,6 +115,7 @@ public data class DoubleSchema(
112115
*
113116
* @property title Optional display title for the field.
114117
* @property description Optional description for the field.
118+
* @property type JSON Schema type discriminator, always `"boolean"`.
115119
* @property default Optional default value.
116120
*/
117121
@Serializable
@@ -157,6 +161,7 @@ public sealed interface SingleSelectEnumSchema : EnumSchemaDefinition
157161
* @property title Optional display title for the field.
158162
* @property description Optional description for the field.
159163
* @property enumValues Array of enum values to choose from.
164+
* @property type JSON Schema type discriminator, always `"string"`.
160165
* @property default Optional default value.
161166
*/
162167
@Serializable
@@ -177,6 +182,7 @@ public data class UntitledSingleSelectEnumSchema(
177182
* @property title Optional display title for the field.
178183
* @property description Optional description for the field.
179184
* @property oneOf Array of enum options with values and display labels.
185+
* @property type JSON Schema type discriminator, always `"string"`.
180186
* @property default Optional default value.
181187
*/
182188
@Serializable
@@ -199,6 +205,7 @@ public data class TitledSingleSelectEnumSchema(
199205
* @property description Optional description for the field.
200206
* @property enumValues Array of enum values to choose from.
201207
* @property enumNames Display names for enum values. Non-standard according to JSON Schema 2020-12.
208+
* @property type JSON Schema type discriminator, always `"string"`.
202209
* @property default Optional default value.
203210
*/
204211
@Deprecated("Use TitledSingleSelectEnumSchema instead")
@@ -231,6 +238,7 @@ public sealed interface MultiSelectEnumSchema : EnumSchemaDefinition
231238
* @property minItems Minimum number of items to select.
232239
* @property maxItems Maximum number of items to select.
233240
* @property items Schema for the array items.
241+
* @property type JSON Schema type discriminator, always `"array"`.
234242
* @property default Optional default value.
235243
*/
236244
@Serializable
@@ -248,6 +256,7 @@ public data class UntitledMultiSelectEnumSchema(
248256
/**
249257
* Schema for the array items with plain enum values.
250258
*
259+
* @property type JSON Schema type discriminator, always `"string"`.
251260
* @property enumValues Array of enum values to choose from.
252261
*/
253262
@Serializable
@@ -268,6 +277,7 @@ public data class UntitledMultiSelectEnumSchema(
268277
* @property minItems Minimum number of items to select.
269278
* @property maxItems Maximum number of items to select.
270279
* @property items Schema for array items with enum options and display labels.
280+
* @property type JSON Schema type discriminator, always `"array"`.
271281
* @property default Optional default value.
272282
*/
273283
@Serializable

0 commit comments

Comments
 (0)