The current elicitation implementation uses a generic JsonObject type for the requested_schema field in CreateElicitationRequestParam. This approach lacks type safety and does not enforce the structure defined in the MCP 2025-06-18 specification.
Current implementation:
pubstructCreateElicitationRequestParam{pubmessage:String,pubrequested_schema:JsonObject,// Too generic, no type safety}According to the MCP specification schema, requestedSchema should have a strict structure:
requestedSchema: {
type: "object";
properties: {[key: string]: PrimitiveSchemaDefinition;};
required?: string[];}Where PrimitiveSchemaDefinition is a union of:
StringSchema (with minLength, maxLength, format: "email" | "uri" | "date" | "date-time")NumberSchema (with minimum, maximum, type: "number" | "integer")BooleanSchema (with default)EnumSchema (with enum: string[], enumNames?: string[])
The current elicitation implementation uses a generic
JsonObjecttype for therequested_schemafield inCreateElicitationRequestParam. This approach lacks type safety and does not enforce the structure defined in the MCP 2025-06-18 specification.Current implementation:
According to the MCP specification schema,
requestedSchemashould have a strict structure:Where
PrimitiveSchemaDefinitionis a union of:StringSchema(withminLength,maxLength,format: "email" | "uri" | "date" | "date-time")NumberSchema(withminimum,maximum, type:"number" | "integer")BooleanSchema(withdefault)EnumSchema(withenum: string[],enumNames?: string[])