Context.session.send_notification
doesn't behave as expected
#215
Milestone
Context.session.send_notification
doesn't behave as expected
#215
(The bug may be related to the MCP dev UI)
Describe the bug
I'm building an MCP server that adds tools dynamically over the lifecycle of the server.
The following code makes it possible to for the client to call
first_tool()
, which will registersecond_tool()
and send a notification to the client to refresh the list.This successfully adds
second_tool()
, but no notification is registered by the client, nor does it trigger the expected tool refresh in the UImcp_issue.mp4
(forgot to show in the video, but hitting
Clear
thenList tools
will showsecond_tool()
in the UISolutions
My understanding is that notification handling and UI changes are the client's responsibility. Currently, the dev toolset doesn't allow me to distinguish:
To unblock me, I would like to have clarity over the intended behavior to make sure I'm not building a castle on sand 😅
Additional info
How does this relate to NotificationOptions? AFAIK, there's no direct configuration point and I would need to override
run_stdio_async()
orrun_sse_async()
(ref) to modify these notification optionsSpecs
mcp
: 1.2.1The text was updated successfully, but these errors were encountered: