Read MCP Apps tool results from notification params
Merged
KL
2d ago+142+142+012345678901234567890123456789-42-42-01234567890123456789
Summary
Read MCP Apps tool-result notifications from params in the clock tutorial and story server. Initialize the UI bridge before consuming notifications, and accept tool results only from the parent window.
Exercise both embedded scripts with self-contained Node tests. Update the documentation line highlights and translations to match the expanded examples.
Fixes #3662
Checks
node --test tests/docs_src/test_apps.test.js- 2 passeduv run --frozen pytest tests/docs_src/test_apps.py -q- 7 passeduv run --frozen ruff check docs_src/apps/tutorial001.py examples/stories/apps/server.py tests/docs_src/test_apps.pyuv run --frozen pyright- no errors
AI Disclaimer
This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.