Summary
The spec defines how a host renders a view once a tool with a ui.resourceUri returns, but it doesn't say what a host should do when that tool call returns an error result (isError: true). Hosts are diverging, and I'd like a recommendation (ideally normative) so implementations stay consistent.
- ChatGPT unmount the view iframe (it was already mounted when the output was received)
- Claude doesn't mount the view iframe
- Goose keep the iframe mounted and proceed with rendering as usual. The
isError value is not accessible from the view.
What the spec covers today
The ui/notifications/tool-result notification and the rendering flow describe the success path (result.content / structuredContent are forwarded to the view). There's ui/notifications/tool-cancelled for cancellation, but nothing addresses a completed tool call whose result has isError: true, e.g.:
{
"content": [{ "type": "text", "text": "My custom error message returned from tool" }],
"isError": true,
}
Questions
- When a tool result has
isError: true, should the host skip rendering the view and fall back to the normal error/text presentation?
- If the view is still rendered, should the host deliver the error via ui/notifications/tool-result (with
isError preserved), via a distinct signal, or not at all? If the same notification is used, how to access the isError boolean?
Summary
The spec defines how a host renders a view once a tool with a ui.resourceUri returns, but it doesn't say what a host should do when that tool call returns an error result (isError: true). Hosts are diverging, and I'd like a recommendation (ideally normative) so implementations stay consistent.
isErrorvalue is not accessible from the view.What the spec covers today
The ui/notifications/tool-result notification and the rendering flow describe the success path (result.content / structuredContent are forwarded to the view). There's ui/notifications/tool-cancelled for cancellation, but nothing addresses a completed tool call whose result has isError: true, e.g.:
{ "content": [{ "type": "text", "text": "My custom error message returned from tool" }], "isError": true, }Questions
isError: true, should the host skip rendering the view and fall back to the normal error/text presentation?isErrorpreserved), via a distinct signal, or not at all? If the same notification is used, how to access theisErrorboolean?