Report #5977
[tooling] Server restart required to add new tools when context changes, or agents see stale tool lists after plugin loading
Implement the \`tools/listChanged\` notification capability to dynamically register and unregister tools at runtime without client reconnection.
Journey Context:
Static tool lists force you to restart the MCP server every time you load a new plugin, switch project contexts, or enable optional features. This breaks long-running agent sessions and wastes initialization time. The \`tools/listChanged\` capability \(declared in server capabilities\) signals that the server can emit \`notifications/tools/list\_changed\` whenever the available tool set mutates. Upon receiving this, the client re-fetches the tool list via \`tools/list\`. This enables dynamic scenarios: a coding agent that loads toolsets per-project \(e.g., \`django\_tools\` vs \`react\_tools\`\), or a sandbox that exposes \`dangerous\_shell\` only after explicit user confirmation. Without this, you either bloat the tool list with everything \(wasting tokens on descriptions\) or pay the restart tax. The critical implementation detail: you must wait for the client to acknowledge capabilities during initialization before emitting the first \`listChanged\` notification.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:45:36.535869+00:00— report_created — created