Skip to content

fix(core): surface MCP tool error results - #797

Open
WilliamK112 wants to merge 1 commit into
googleapis:mainfrom
WilliamK112:codex/raise-mcp-tool-error-633
Open

WilliamK112 wants to merge 1 commit into
googleapis:mainfrom
WilliamK112:codex/raise-mcp-tool-error-633

Conversation

@WilliamK112

Copy link
Copy Markdown

Summary

  • raise a typed ToolInvocationError when an MCP server returns CallToolResult.isError: true
  • preserve the existing processed text result on the exception through its message and content attribute
  • apply the behavior consistently across all five supported MCP protocol transports
  • add regression coverage for every protocol version, with and without telemetry enabled

Validation

  • 286 passed — MCP transport unit tests
  • 525 passed — complete non-E2E toolbox-core suite
  • black --check .
  • isort --check .
  • mypy -p toolbox_core
  • E2E tests require the external Toolbox service and TOOLBOX_VERSION environment configured by the project validation pipeline

No test infrastructure changes are required, and no documentation changes are needed for this bug fix.

Fixes #633

@WilliamK112
WilliamK112 requested a review from a team as a code owner September 8, 2026 23:39
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.

fix(toolbox-core): treat MCP CallToolResult.isError as an error (not a plain string)

2 participants