Skip to content

mcp: ensure tool refresh finishes after dynamic tool call#268025

Merged
connor4312 merged 1 commit intomainfrom
connor4312/261611
Sep 23, 2025
Merged

mcp: ensure tool refresh finishes after dynamic tool call#268025
connor4312 merged 1 commit intomainfrom
connor4312/261611

Conversation

@connor4312
Copy link
Copy Markdown
Member

Closes #261611

Copilot AI review requested due to automatic review settings September 23, 2025 18:36
@connor4312 connor4312 enabled auto-merge (squash) September 23, 2025 18:36
@connor4312 connor4312 self-assigned this Sep 23, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures that tool refresh operations complete after dynamic tool calls in the MCP (Model Context Protocol) server implementation. The change addresses an issue where dynamic tool calls could complete before the server had finished refreshing its tool list, potentially causing synchronization problems.

Key changes:

  • Added awaitToolRefresh() method to wait for tool refresh completion
  • Updated both call() and _callWithProgress() methods to wait for tool refresh after tool execution
  • Refactored _callWithProgress() to use async/await pattern for better error handling

@vs-code-engineering vs-code-engineering bot added this to the September 2025 milestone Sep 23, 2025
@connor4312 connor4312 merged commit 8bd3237 into main Sep 23, 2025
28 checks passed
@connor4312 connor4312 deleted the connor4312/261611 branch September 23, 2025 18:58
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Nov 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MCP] Newly added tools not included in subsequent completion calls

3 participants