From 8ff6b593d6c249a34273b021b1ab0bf720412f72 Mon Sep 17 00:00:00 2001 From: "D. Michael Piscitelli" Date: Sat, 7 Mar 2026 06:41:00 +0100 Subject: [PATCH] feat: handle tools/resources/prompts list_changed notifications When a server sends list_changed notifications, the inspector now automatically refreshes the corresponding lists. Pagination cursors are reset to ensure a clean re-fetch from the first page. Follows the existing pattern used for tasks/list_changed. Closes #832 Co-Authored-By: Claude Opus 4.6 --- client/src/App.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/client/src/App.tsx b/client/src/App.tsx index 12e9a7bd0..0a8286d6b 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -400,6 +400,27 @@ const App = () => { onNotification: (notification) => { setNotifications((prev) => [...prev, notification as ServerNotification]); + if (notification.method === "notifications/tools/list_changed") { + setNextToolCursor(undefined); + setTools([]); + void listTools(); + } + + if (notification.method === "notifications/resources/list_changed") { + setNextResourceCursor(undefined); + setNextResourceTemplateCursor(undefined); + setResources([]); + setResourceTemplates([]); + void listResources(); + void listResourceTemplates(); + } + + if (notification.method === "notifications/prompts/list_changed") { + setNextPromptCursor(undefined); + setPrompts([]); + void listPrompts(); + } + if (notification.method === "notifications/tasks/list_changed") { void listTasks(); }