Skip to content

Commit db6f0cc

Browse files
committed
feat(client): handle tools/resources/prompts list_changed notifications
Mirrors the existing tasks/list_changed handler. When a server with listChanged: true capability sends the corresponding notification, the inspector now refreshes its catalog via the same listTools / listResources / listPrompts functions used by the manual Refresh buttons. Before this fix, the inspector imported the *ListChangedNotificationSchema types from the SDK but never dispatched on them — gateway-style MCP servers that hot-load tools mid-session had stale UIs until the user manually reconnected. Closes #832.
1 parent f18775a commit db6f0cc

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

client/src/App.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,15 @@ const App = () => {
404404
if (notification.method === "notifications/tasks/list_changed") {
405405
void listTasks();
406406
}
407+
if (notification.method === "notifications/tools/list_changed") {
408+
void listTools();
409+
}
410+
if (notification.method === "notifications/resources/list_changed") {
411+
void listResources();
412+
}
413+
if (notification.method === "notifications/prompts/list_changed") {
414+
void listPrompts();
415+
}
407416

408417
if (notification.method === "notifications/tasks/status") {
409418
const task = notification.params as unknown as Task;

0 commit comments

Comments
 (0)