fastmcp.server.elicitation
Functions
get_elicitation_schema
response_type
: The type of the response
validate_elicitation_json_schema
- Must be an object schema
- Must only contain primitive field types (string, number, integer, boolean)
- Must be flat (no nested objects or arrays of objects)
- Allows const fields (for Literal types) and enum fields (for Enum types)
- Only primitive types and their nullable variants are allowed
schema
: The JSON schema to validate
TypeError
: If the schema doesn’t meet MCP elicitation requirements