← Back to ToolBench
Client Features
Elicitation
Server-initiated user data requests
What it does
Elicitation enables servers to request structured input from the user through the client. When a server needs information it cannot determine on its own (credentials, preferences, or confirmations) it sends elicitation/create with a JSON Schema describing the requested data. The client presents this to the user and returns their response. This keeps the human in the loop for sensitive decisions.
How it works
Example implementation
const response = await server.elicit({
message: "Please provide your API credentials",
requestedSchema: {
type: "object",
properties: {
apiKey: { type: "string", title: "API Key" },
region: { type: "string", enum: ["us-east", "eu-west"] }
},
required: ["apiKey"]
}
});