Whatever message this page gives is out now! Go check it out!

Elicitation

Last update:
May 18, 2026
Enable your MCP client to collect user input based on server-defined schemas.
Elicitation is the inverse of sampling: the server asks the client to collect additional user input according to a schema.
Elicitation Request Format (from server):

{
    "message": "Would you like to check alternative flights?",
    "requestedSchema": {
        "type": "object",
        "properties": {
            "checkAlternatives": { "type": "string" },
            "flexibleDates": { "type": "string" }
        }
    }
}
            
  1. Define your elicitation handler function.
    ADDITIONAL INFORMATION:

<cfscript>

function myElicitationHandler(request) {

    var message = request.message;
    var requestedSchema = request.requestedSchema;

    return {
        action: "accept",
        content: {
            checkAlternatives: "true",
            flexibleDates: "next_day"
        }
    };

}

</cfscript>
                    
  1. Configure MCP client with elicitation enabled.
    ADDITIONAL INFORMATION:

<cfscript>

configData = {

    transport: { /* transport config */ },

    capabilities: {
        elicitation: true
    },

    elicitationConsumer: myElicitationHandler
};

mcpClient = MCPClient(configData);

</cfscript>
                    
Result
Response Format
FieldTypeRequiredValuesDescription
actionStringYes"accept", "decline", "cancel"User's response
contentStructConditionalKey-value pairsRequired if action is "accept"
Your MCP client can now receive elicitation requests, collect user input per schema, and return structured responses.

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page