MCP elicitations provide a standardized way for MCP servers to request missing information from users through the client during tool interactions. The tutorial walks through building a coffee shop ordering demo using Spring AI, covering both the server side (defining an MCP tool that checks for missing parameters and triggers elicitation) and the client side (using the @McpElicitation annotation to handle incoming requests and prompt the user via scanner). The MCP inspector is used to test the server independently before wiring up the full Spring AI client. A known issue is noted where the LLM may skip calling MCP tools with empty arguments, worked around via a system prompt instructing the model to always invoke the tool with empty strings for unspecified parameters.

25m watch time

Sort: