{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreichh6chgdtwdpqcbu25uungj6s5nw5bfkwsrife6vdnu5eft7femy",
"uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mgj6iy5et6g2"
},
"path": "/t/bug-chatgpt-strips-meta-from-tool-results-and-breaks-mcp-apps-viewuuid-state-persistence-pattern/1375980#post_1",
"publishedAt": "2026-03-07T22:51:15.000Z",
"site": "https://community.openai.com",
"tags": [
"MCP Apps compatibility guide",
"documented viewUUID pattern for persisting view state"
],
"textContent": "We migrated our ChatGPT App from the OpenAI Apps SDK to the MCP Apps standard, following the MCP Apps compatibility guide. The migration went fine. Tools, resources, `ontoolresult`, `callServerTool`, `sendMessage`, and app-only tool visibility all work correctly.\n\nHowever, when implementing the documented viewUUID pattern for persisting view state, we discovered that ChatGPT strips `_meta` from tool results before forwarding them to the widget.\n\n### Steps to reproduce\n\n 1. Server returns `_meta: { viewUUID: crypto.randomUUID() }` in a tool’s `CallToolResult`\n 2. Widget reads `result._meta` in the `ontoolresult` callback\n 3. `result._meta` is `undefined`\n\n\n\n### Expected\n\n`result._meta` should be forwarded to the widget as part of `ui/notifications/tool-result`, per the MCP Apps spec (`McpUiToolResultNotification.params` is `CallToolResult`, which extends `ResultSchema` containing `_meta`).\n\n### Actual\n\n`result._meta` is `undefined`. The viewUUID never reaches the widget, so localStorage-based state persistence cannot work.\n\n### Code\n\n**Server (tool handler):**\n\n\n return {\n content: [{ text: \"...\", type: \"text\" }],\n structuredContent: { /* ... */ },\n _meta: { viewUUID: crypto.randomUUID() },\n };\n\n\nClient (widget):\n\n\n app.ontoolresult = (result) => {\n console.log(\"_meta:\", result._meta); // undefined\n console.log(\"viewUUID:\", result._meta?.viewUUID); // undefined\n };\n\n\nLogs\n\n\n [App] ontoolresult _meta: undefined\n [App] viewUUID: undefined\n\n\nThis is the only MCP Apps pattern we’ve found that doesn’t work in ChatGPT. Everything else from the migration guide works as expected.\n\nUpdate: This pattern works correctly in Claude — result._meta.viewUUID is forwarded as expected. The issue is specific to ChatGPT’s host implementation.",
"title": "Bug: ChatGPT strips _meta from tool results and breaks MCP Apps viewUUID state persistence pattern"
}