Skip to content

Tool list does not refresh on tools/list_changed notification #1292

@xusenlin

Description

@xusenlin

Inspector Version

v0.21.2

Describe the bug

After the server emits notifications/tools/list_changed, the Tools panel
in the UI does not refresh. Manually refreshing is also impossible because
the "List Tools" button becomes disabled once the list has been loaded
(isButtonDisabled={!nextCursor && tools.length > 0} in ToolsTab).
The same issue affects the Resources and Prompts tabs by the same patterns.

Root cause (verified in source)

  1. In client/src/App.tsx, the onNotification callback in the
    useConnection hook only handles notifications/tasks/list_changed
    and notifications/tasks/status. There are no handlers for
    tools/, resources/, or prompts/ list_changed, so these
    notifications are received but ignored for refresh purposes.

  2. In client/src/components/ToolsTab.tsx (and similarly in
    ResourcesTab.tsx, PromptsTab.tsx), the <ListPane> is rendered
    with isButtonDisabled={!nextCursor && items.length > 0}. Once
    pagination is exhausted, the List button is disabled, so users
    cannot trigger a manual refresh either.

To Reproduce

  1. Connect to an MCP server that declares tools.listChanged: true.
  2. Click "List Tools" — N tools shown.
  3. On the server, dynamically add or remove a tool. Server emits
    notifications/tools/list_changed (visible in Inspector's
    Notifications panel, confirming the wire-level delivery).
  4. The Tools panel still shows the stale list.
  5. The "List Tools" button is greyed out — manual refresh impossible.
  6. The only workaround is to disconnect and reconnect.

Expected behavior

  • The Tools panel auto-refreshes (re-issues tools/list) on
    notifications/tools/list_changed.
  • The List button stays usable as a manual refresh fallback (perhaps
    showing "Refresh Tools" instead of being disabled when fully loaded).
  • Same applies to Resources and Prompts.

Server side

Verified the server is correctly compliant: a raw GET stream shows the
notifications/tools/list_changed event arriving for every server-side
toggle, and a fresh tools/list after the change returns the updated
list. Tested with the official Go SDK
(github.com/modelcontextprotocol/go-sdk v1.4.0) over Streamable HTTP.

Willing to submit a PR

Yes, happy to submit a PR if this is welcome. Could limit it to the
tools tab first, or cover all three (tools / resources / prompts) in
one go — let me know your preference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions