docs: remove entity wrapper from MCP response examples#360
Merged
igrigorik merged 1 commit intoUniversal-Commerce-Protocol:mainfrom Apr 20, 2026
Merged
Conversation
12 tasks
alexpark20
approved these changes
Apr 16, 2026
Contributor
alexpark20
left a comment
There was a problem hiding this comment.
Good catch 👏
I think this should be merged into 04-08 release branch as well
igrigorik
approved these changes
Apr 16, 2026
Contributor
igrigorik
left a comment
There was a problem hiding this comment.
Thanks for catching this @jamesandersen. Tracing lineage...
- #141 introduced the wrapper when adding
tools/callenvelope to MCP examples -- input wrapper keys ("checkout","cart") were copy-pasted into outputstructuredContent— doh. - #239 opened the correct fix, was closed as "resolved via #216" But 216 rewrote error response examples flat (correct) but didn't touch success responses - miss, doh again.
Once we land #359, this kind of bugs should -- hopefully -- become a thing of the past.
drewolson-google
approved these changes
Apr 17, 2026
MCP response examples incorrectly nested the UCP payload under a "checkout", "cart", or "order" key inside structuredContent. The OpenRPC result.name field is descriptive metadata — it does not create a wrapper key in the JSON-RPC wire format (per the OpenRPC spec, name only affects params in by-name mode, not results). This aligns success response examples with error responses, which already placed the UCP envelope directly in structuredContent without a wrapper. Addresses the same issue as the closed Universal-Commerce-Protocol#239 — that fix was deferred to Universal-Commerce-Protocol#216, which corrected error responses but left success responses wrapped.
f64c851 to
cb43d77
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MCP response examples incorrectly nest the UCP payload under a
"checkout","cart", or"order"key insidestructuredContent. Per the OpenRPC specification, theresult.namefield is descriptive metadata for documentation and tooling — it does not create a wrapper key in the JSON-RPC wire format. Thenamefield only has wire-format significance onparams(by-name parameter passing), not onresult.This creates an inconsistency in the current docs: error responses already place the UCP envelope directly in
structuredContent(no wrapper), while success responses incorrectly wrap it.Before (success response)
After (success response — consistent with error responses)
Files changed
docs/specification/checkout-mcp.md— 4 response examplesdocs/specification/cart-mcp.md— 6 response examplesdocs/specification/order-mcp.md— 3 response examplesdocs/specification/overview.md— 1 MCP transport exampleContext
Addresses the same issue as #239, which was closed because #216 was expected to include this fix. #216 corrected error response examples but left success responses wrapped.
Checklist