Skip to content

docs(protocol): define MCP transport binding for A2UI and align MCP s…#627

Open
iamrajhans wants to merge 1 commit intogoogle:mainfrom
iamrajhans:mcp-docs
Open

docs(protocol): define MCP transport binding for A2UI and align MCP s…#627
iamrajhans wants to merge 1 commit intogoogle:mainfrom
iamrajhans:mcp-docs

Conversation

@iamrajhans
Copy link
Contributor

Summary

Formalize A2UI-over-MCP transport semantics and align the MCP demo payload shape with the spec.

Closes #558.

What changed

  • Added a dedicated MCP binding section to:
    • specification/v0_10/docs/a2ui_protocol.md
    • specification/v0_9/docs/a2ui_protocol.md
  • Defined normative MCP rules for:
    • Ordered message aggregation via top-level messages array
    • Schema validation (server_to_client_list.json / client_to_server_list.json)
    • Batch processing/error handling behavior
    • Tool vs resource usage
    • Post-creation UI updates
    • Catalog negotiation via a2uiClientCapabilities
  • Updated MCP sample server to match the canonical shape:
    • samples/agent/adk/mcp/server.py
    • Changed tool output and schema key from events to messages.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request formalizes the A2UI-over-MCP transport binding and aligns the sample server implementation. The documentation additions in a2ui_protocol.md for both v0.9 and v0.10 are clear, detailed, and well-structured. The corresponding changes in the Python sample server correctly reflect the spec by using a messages key and introducing a constant for it, which improves code quality. My only feedback is a minor suggestion to improve link consistency in the markdown files.

Comment on lines +116 to +117
- For server-to-client UI updates, `messages` MUST validate against [server_to_client_list.json](../json/server_to_client_list.json).
- For client-to-server events, `messages` MUST validate against [client_to_server_list.json](../json/client_to_server_list.json).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other schema links in this document (like [a2ui_client_capabilities.json]), it would be better to use reference-style links here. This would make all schema links follow the same pattern.

Here is the suggested change:

  - For server-to-client UI updates, `messages` MUST validate against [`server_to_client_list.json`].
  - For client-to-server events, `messages` MUST validate against [`client_to_server_list.json`].

You'll also need to add the corresponding definitions at the end of the file:

[`server_to_client_list.json`]: ../json/server_to_client_list.json
[`client_to_server_list.json`]: ../json/client_to_server_list.json

Comment on lines +121 to +122
- For server-to-client UI updates, `messages` MUST validate against [server_to_client_list.json](../json/server_to_client_list.json).
- For client-to-server events, `messages` MUST validate against [client_to_server_list.json](../json/client_to_server_list.json).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other schema links in this document (like [a2ui_client_capabilities.json]), it would be better to use reference-style links here. This would make all schema links follow the same pattern.

Here is the suggested change:

  - For server-to-client UI updates, `messages` MUST validate against [`server_to_client_list.json`].
  - For client-to-server events, `messages` MUST validate against [`client_to_server_list.json`].

You'll also need to add the corresponding definitions at the end of the file:

[`server_to_client_list.json`]: ../json/server_to_client_list.json
[`client_to_server_list.json`]: ../json/client_to_server_list.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Formally define how to transport A2UI over MCP

1 participant