window.openai.toolInput not populated

Hey there,

Noticed a small bug since yesterday on ChatGPT.
Looks like window.openai.toolInput is not populated anymore (while still showing as existing on the tool call debug panel).
Is anyone else experiencing the same issue?

Thanks

This break loading states of widgets! Pretty critical depending on how loading states are implemented

Hey all,

Do you pass in toolInfo? If so, we made a change to send this information via ui/notifications/tool-input instead, to improve MCP Apps compatibility. This also ensures that tool approval information gets into the app even if it’s delayed.

If you feel like that’s the wrong direction, I’m happy to learn more about what this breaks and continue iterating on the solution.

@casey-chow that surely improves MCP app compatibility, but it breaks existing apps that rely on window.openai.toolInput.
I guess that at some point all the window.openai.* APIs will be deprecated in favor of the MCP App spec, but until then it would be nice to maintain backward compatibility.

Good note, I have a fix up to put that information back in. Thanks too to @fredisterik for a similar note.

What I’ll change is to ensure that widget state populates window.openai.toolInput but doesn’t guarantee it is there on initial load; this isn’t guaranteed anyway and breaks situations where the widget loads around the same time the tool call gets approved. Let me know if this would work?

This would work perfectly fine on our side with such implementation. We never assumed tool input would always be defined, but always eventually defined. Thanks @casey-chow for the proposed fix :slight_smile:

Great, this change should be deployed. Let me know if it works!

All good, thanks @casey-chow !