Skip to content

bug: ChatGPT adapter missing _meta normalization — useCallTool data inconsistent across runtimes #709

@qchuchu

Description

@qchuchu

Summary

Since PR #294 unified the useCallTool response interface around a meta property, the MCP-apps adaptor normalizes _meta → meta correctly. However, OpenAI has since started returning _meta in addition to (or instead of) meta, and the ChatGPT Apps SDK adaptor does not perform the same normalization.

Current behavior

Runtime Property on useCallTool data
MCP Apps meta (normalized ✅)
ChatGPT Apps SDK _meta (not normalized ❌)

Expected behavior

Both runtimes expose a unified meta property on the object returned by useCallTool, matching the documented CallToolResponse type.

Root cause

The ChatGPT adaptor lacks the _meta → meta normalizer that was added to the MCP-apps adaptor in #294. OpenAI's runtime now returns _meta, so the raw value passes through unnormalized.

Steps to reproduce

  1. Build an app using useCallTool.
  2. Call a tool with metadata in the response.
  3. Access data.meta — it is undefined when running inside ChatGPT (Apps SDK); it works correctly inside MCP-apps hosts.

Fix

Mirror the normalization already present in the MCP-apps adaptor to the ChatGPT Apps SDK adaptor: map _meta to meta when constructing the CallToolResponse object.


Reported in #294 (comment) by @huckym.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions