Skip to content

[v5.0] reproduction: could not reproduce addToolResult does not work with MCP tools dynamic-tool - #20311

Closed
ai-sdk-factory[bot] wants to merge 1 commit into
release-v5.0from
bug-reproduction-7868-20260903190917802225
Closed

[v5.0] reproduction: could not reproduce addToolResult does not work with MCP tools dynamic-tool#20311
ai-sdk-factory[bot] wants to merge 1 commit into
release-v5.0from
bug-reproduction-7868-20260903190917802225

Conversation

@ai-sdk-factory

@ai-sdk-factory ai-sdk-factory Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Bug

addToolResult does not work with MCP tools (dynamic-tool)

Reproduction

  • The reported regression existed in ai@5.0.0: addToolResult filtered with isToolUIPart, which excluded MCP dynamic-tool parts.
  • The checked-out target contains ai@5.0.252; packages/ai/src/ui/chat.ts now handles static and dynamic tool parts through isToolOrDynamicToolUIPart.
  • packages/ai/CHANGELOG.md records the fix in ai@5.0.23, so upgrading to ai@5.0.23 or newer resolves the reported behavior without application workarounds.
  • examples/ai-functions/src/reproduction/issue-7868.ts, supported by examples/ai-functions/package.json, verifies the expected HITL outcome: addToolResult changes the dynamic MCP tool to output-available, preserves its output, and sendMessage() submits that updated part; all assertions passed.
  • The separate comment about automatic MCP execution through a custom GraphQL streaming implementation could not be independently evaluated because no isolated provider, model, or transport setup was supplied; it does not change the primary result.

Relevant Documentation

Related Issues

Could not reproduce #7868

Co-authored-by: Aayush Kapoor <83492835+aayush-kapoor@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant