Telling connected MCP clients about tools added mid-session
CCDV-F
Tools & MCP
Easy
Question 39 of 105
An MCP server for a plugin platform gains new tools mid-session as users install plugins. Connected clients keep using the tool list they fetched at startup.
How should the server tell connected clients the list has changed?
Show answer and explanation
DDeclare the listChanged capability and send notifications/tools/list_changed
A server that declares the listChanged capability sends notifications/tools/list_changed when its tool set changes, delivered to clients that opened a subscriptions/listen stream with toolsListChanged true, and those clients then call tools/list again. Dropping the connection discards in-flight work to convey what a notification already carries. A tool result has no slot for tool definitions, and a client with no call in flight would never see them. And polling is unnecessary because the notification exists.
Source: modelcontextprotocol.io/
Anonymous, no account needed. Your tally stays in this browser.
Practice by topic: MCP questions