Failing MCP tool calls render [object Object] in the step summary

Author: ManoharPaturiCreated Sep 18, 2026Updated Sep 19, 2026
Labelsbugmcpp3

what happens

when an MCP tool call fails, the step summary renders the error as [object Object] instead of the actual error text.

why

mcp servers return tool errors as a content array of text blocks ([{type: "text", text: "..."}]), including the action's own mcp server. the error branch in formatResultContent interpolates toolResult.content straight into a template string, so an array stringifies to [object Object]. the non-error branch handles arrays via formatResultContent, the error branch does not.

repro

a tool result with is_error: true and content: [{type: "text", text: "boom"}] produces ❌ **Error:** \[object Object]`` in the summary.

expected

the error shows boom.

env: main a4f54ef

Source: anthropics/claude-code-action