Skip to content

fix(mcp_tool): set skip_summarization on confirmation pause - #6986

Closed
Zsanz3 wants to merge 1 commit into
google:mainfrom
Zsanz3:cursor/fix-mcp-skip-summarization-4c2a
Closed

fix(mcp_tool): set skip_summarization on confirmation pause#6986
Zsanz3 wants to merge 1 commit into
google:mainfrom
Zsanz3:cursor/fix-mcp-skip-summarization-4c2a

Conversation

@Zsanz3

@Zsanz3 Zsanz3 commented Sep 2, 2026

Copy link
Copy Markdown

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

Problem:
McpTool.run_async's require_confirmation gate calls tool_context.request_confirmation(...) and returns the pause error dict, but never sets tool_context.actions.skip_summarization = True. FunctionTool does set that flag. Without it, the LLM flow re-invokes the model and retries the tool, producing an unbounded confirmation loop.

Fix:
Set tool_context.actions.skip_summarization = True on the confirmation pause path, matching FunctionTool.

Test:
Assert skip_summarization is True in the existing require_confirmation unit test.

Testing Instructions

pytest tests/unittests/tools/mcp_tool/test_mcp_tool.py -q -k require_confirmation

McpTool's confirmation gate requested confirmation and returned the
pause error but never set skip_summarization, so the LLM flow re-invoked
the model and retried the tool. Match FunctionTool and set the flag
before returning the pause error.

Fixes google#6977

Co-authored-by: Zsanz3 <Zsanz3@users.noreply.github.com>
@google-cla

google-cla Bot commented Sep 2, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@wukath

wukath commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

thanks for the contribution! we actually just merged the same fix internally: cb0eb22, closing as fixed

@wukath wukath closed this Sep 3, 2026
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.

McpTool's require_confirmation gate doesn't set skip_summarization

2 participants