Repository navigation
dsh-mcp-client hardcodes listChanged.tools.autoRefresh: false — an existing session never observes MCP tool-list changes #9625
Replies: 2 comments
|
The literal is where you say it is, and the refresh machinery is wired — but I think the decisive variable in your reproduction is not that literal, and the restart in your steps is how you can see it. The code, at listChanged: {
tools: {
autoRefresh: false,
debounceMs: 0,
onChanged: () => { void refreshTools() },
},
},with But your reproduction restarts DSH as well as the MCP server, and that reconnect re-lists the tools independently of If it does turn out to be the client-side notification, the honest boundary is that a plugin cannot reach it: the Your minimum ask — documenting that a session's MCP tool list is captured at session creation — is the right fallback either way, because that capture is the one thing both hypotheses share. |
|
Thanks — this is the most useful correction we've had, and the discriminating experiment you proposed settles it. We ran it. Results: 1. The notification mechanism is alive. We decompressed our session record (the file is multi-frame zstd, which took some work) and found 28 2. Before the DSH restart, the two new MCP tools produced zero notices. We added them on the bridge side, restarted the bridge (not DSH), and the session log stayed silent about them. They never reached the registry. 3. After a DSH restart this morning, the record shows exactly one new notice (08:37 local): So the discriminating variable turns out to be the restart — i.e. the reconnect that forces a sync at What we still hope for (unchanged from the original post): make Also noted and accepted: out-of-tree plugins cannot reach Confirmed end-to-end: after opening our endpoint auth (the "console-only" guard was our own server's rule, not dsh's), the agent-side call to |
Uh oh!
There was an error while loading. Please reload this page.
Summary
@deepseek-ai/dsh-mcp-clientconstructs its MCPClientwith a hardcodedlistChanged.tools.autoRefresh: false. The value is a literal in the connection code, not a config field, so a session that is already running can never pick up tools that an MCP server adds at runtime — even though the MCP protocol definesnotifications/tools/list_changedfor exactly this purpose, and the re-sync path inside dsh is present and working.Evidence (from the shipped bundle)
1. The client options are a literal, not config. In
dsh-mcp-client'sconnectGeneration():2. The refresh path exists.
refreshTools()logs`${label}: tool list changed, re-syncing`and callsenqueueSync(generation). The machinery is there; it is simply unreachable whileautoRefreshis forced tofalse.3. No config escape hatch. Searching the plugin's config schema for
listChanged/autoRefreshfinds no configurable field.Reproduction (measured)
Environment: dsh
0.2.0-rc.2(Windows, Electron),dsh-mcp-client0.0.1.unknown tool "mcp__<server>__<newTool>".The same happens with an entirely new MCP server added to the profile: existing sessions keep their old tool list; only sessions created afterwards see it.
Expected behaviour (either would help)
listChanged.tools.autoRefresh(anddebounceMs) as plugin config fields, so deployments that want runtime tool refresh can enable it. Alternatively default it totrueand let the MCP server decide when to notify.Why this is a general problem (not a niche request)
MCP defines
notifications/tools/list_changedprecisely so that servers can add or remove tools at runtime. WithautoRefreshhardcoded off, that capability is unreachable in dsh no matter what an MCP server does — which makes dsh less MCP-conformant than the SDK it builds on.For completeness: our own MCP server does not emit
list_changedyet either; we intend to add it. But adding it today would change nothing, because the client cannot act on it.Secondary observation (may well be by design)
The same "assembled at session creation" behaviour appears in the skill system: after adding new skill files and enabling
dsh-skill/dsh-skill-filesystem/tool-skill/skill-badge, an existing session's available-skills list does not show them, while a newly created session sees them immediately. If that is intentional, one line in the docs would help.Separately, the "preset chosen, session already started → locked" behaviour (
agent-preset/locked,This session has already started) is visible in the source. We are not asking to change that; we only want to know whether it additionally gates the session's tool surface.All reactions