Skip to content

fix: preserve complete MCP call tool results - #1448

Open
eyesofish wants to merge 1 commit into
google:mainfrom
eyesofish:eyesofish/fix-mcp-call-result-fields
Open

fix: preserve complete MCP call tool results#1448
eyesofish wants to merge 1 commit into
google:mainfrom
eyesofish:eyesofish/fix-mcp-call-result-fields

Conversation

@eyesofish

Copy link
Copy Markdown

Summary

  • preserve the complete successful MCP CallToolResult, including ordered content, structured content, metadata, and isError
  • retain the legacy text_output field for backward compatibility
  • cover mixed text/image and non-text-only results

Testing

  • ./mvnw fmt:format
  • ./mvnw -pl core -Dtest=AbstractMcpToolTest,ClaudeTest test
  • ./mvnw -pl core test (1,751 tests, 0 failures)

Closes #1443

Replaces #1446 (accidentally closed; GitHub blocks reopening after the head branch was force-pushed).

@google-cla

google-cla Bot commented Aug 21, 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.

@eyesofish
eyesofish force-pushed the eyesofish/fix-mcp-call-result-fields branch from e03e01e to 0843b90 Compare August 21, 2026 15:06
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 drops structuredContent and non-text content from CallToolResult

1 participant