github / github/copilot-cli

MCP tools/list_changed notification: updated tools not visible to the model until the next user turn

未关闭
#3,125 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
area:mcp area:tools triaged
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

When an MCP server emits a notifications/tools/list_changed notification mid-turn, the updated tool list is not visible to the model until the next user turn.

**Repro / observed behavior**
User sends a message; the agent loop starts.
The model calls a tool on an MCP server; that tool causes the server to add/remove a tool and emit notifications/tools/list_changed.
The agent loop continues with another model iteration in the same turn.
The model still sees the old tool list. Newly added tools are not callable; removed tools are still advertised.
On the next user message, the new tool list finally becomes visible.

### Affected version

1.0.41-1

### Steps to reproduce the behavior

User sends a message; the agent loop starts.
The model calls a tool on an MCP server; that tool causes the server to add/remove a tool and emit notifications/tools/list_changed.
The agent loop continues with another model iteration in the same turn.
The model still sees the old tool list. Newly added tools are not callable; removed tools are still advertised.
On the next user message, the new tool list finally becomes visible.

### Expected behavior

The model can see the new newly added tools without requiring another user->model conversation turn.
This is required in order to support MCP servers that implement progressive disclosure of tools server-side.

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

Start by reproducing the described agent loop with an MCP server whose tool call emits notifications/tools/list_changed, then trace where the tool list is supplied on the next model iteration. Done means newly added tools are visible and removed tools are no longer advertised within the same user turn, without requiring another user message.

由索引模型根据 Issue 内容生成。

评估

领域
cli
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。