-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Thank you for this great project.
Is your feature request related to a problem? Please describe.
I'm always frustrated when MCP Servers (model context protocol) are trying to make elicitation requests (try to communicate with the user) and adk simply states "elicitation is not supported". As it stands, MCP servers cannot communicate with the user.
Describe the solution you'd like
MCP Servers should have a simple way of requesting structured information directly from the user. Therefore, I'd like adk to support this part of the protocol.
Describe alternatives you've considered
Since there is no real alternative, I tried to implement elicitation support in adk myself. After days of no progress, I am giving up and writing this issue, hoping that someone smarter than me can pull it of.
Additional context
Findings.
google.adk.tools.mcp_tool.mcp_session_manager.MCPSessionManager.create_session
should pass theelicitation_callback
parameter to themcp.ClientSession.__init__
call- The
elicitation_callback
should emit an Event, where the message contains theelicitation_request
, marked as such. - The
elicitation_callback
should further await a future - The future is filled by the runner, when it receives a corresponding
elicitation_response
message, which is also marked as such. - The
elicitation_callback
will return the result of the future which, in turn, will continue themcp.ClientSession
.
Since i don't understand how adk handles futures, sessions, states, etc in detail, I am slightly overwhelmed by this task, so my findings can be wrong and misleading, maybe there is a much easier way to do it. E.g. one that does not require a modification of the runner and can be handled entirely in the MCPSessionManager.
Can you give a heads up, if this is planned at all, if you have a timeline for this, or if you are maybe already working on this?