Skip to content

fix(mcp): cancel workbench tool calls - #8325

Open
Luck (67-luck) wants to merge 1 commit into
microsoft:mainfrom
67-luck:fix/mcp-workbench-cancellation
Open

Luck (67-luck) wants to merge 1 commit into
microsoft:mainfrom
67-luck:fix/mcp-workbench-cancellation

Conversation

@67-luck

Copy link
Copy Markdown

Summary

  • Fix McpWorkbench.call_tool passing a raw MCP coroutine to CancellationToken.link_future.
  • Wrap the coroutine in an asyncio.Task before linking cancellation.
  • Add an offline regression test covering cancellation of an in-flight tool call.

Fixes #8265.

Validation

  • git diff --check
  • python -m compileall for the changed source and test files
  • The full pytest test cannot run in this environment because pytest and mcp are not installed.

@67-luck

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

McpWorkbench.call_tool passes a raw coroutine to CancellationToken.link_future: cancelling raises AttributeError and the tool call is never cancelled

1 participant