Ji Xing 吉星饭厅

Agent-ready CNY reservation page for Malaysian Chinese restaurants

WebMCP (W3C) navigator.modelContext Bilingual (EN + 中文) Schema.org Vanilla JS Static HTML Chrome 146+

Project Overview & Problem Statement

Challenge: Chinese New Year reunion bookings are the single biggest revenue spike of the year for Malaysian Chinese restaurants — Putien, Dragon-i, Tai Thong-tier banquet houses earn 25–40% of their annual revenue in the 6-week CNY window. Yet the booking flow is still phone-driven for most mid-tier operators. Modern shoppers want online booking. Future shoppers won't book themselves at all — they'll ask Auto Browser, Gemini, or ChatGPT Atlas to do it. Pixel-clicking agents can't reliably navigate a multi-step reservation flow with date pickers, dietary selectors, and seating-type variants — they abandon halfway. The merchant loses both the modern customer and the future agent-driven customer.

Solution: Ji Xing 吉星饭厅 is a CNY festival reservation page for a fictional Malaysian Cantonese banquet restaurant, built with the W3C WebMCP standard (navigator.modelContext). Six bilingual set menus (RM 688–RM 1,288), a 9-day slot grid (480 bookable tables across 14–22 February 2026), and a 7-tool typed contract that AI agents can invoke directly through the browser. Humans see a beautiful festival booking page that ranks on Google. Agents see "Here are my 7 tools — search, get details, check availability, reserve, get, modify, cancel — call them with structured parameters." No screenshotting. No abandoned reservations. No pixel-clicking dietary dropdowns.

Key Benefits

How to Experience This Demo — 3 Test Paths

The UI is a beautiful CNY booking page that looks completely normal. WebMCP runs invisibly underneath — a customer who isn't told would never notice the agent-callable layer is there. The 3 paths below let you experience the difference between a WebMCP-enabled reservation page and a regular one.

Path 1 — Browse and Book as a Human

What it looks like: Browse 6 set menus, click "View Details" on any card, pick "Reserve This Set", choose a date and sitting (try 16 Feb Reunion Eve to see the peak-day rule), fill the form, confirm.

What's happening: Pure static interaction. No LLM involved anywhere. Get a booking reference (JX-CNY26-XXXXX), download the .ics calendar file, manage with the lookup form. The Inspector Panel sits unobtrusive at bottom-right — a normal customer won't notice it.

Cost: zero. Difference vs non-WebMCP page: none visible to the human user.

Path 2 — Try as Agent (Inspector buttons)

What it looks like: Open the Inspector Panel → Try as Agent tab → click any "▶ Run [tool]" button. Try checkAvailability for Reunion Eve dinner-2 with 10 pax — see the typed JSON response.

What's happening: The page invokes its own registered WebMCP tools with sample params and shows the typed JSON result in the Log tab. Still no LLM. This simulates exactly what a real AI agent would call when planning a CNY reservation.

Cost: zero. Difference vs non-WebMCP page: a non-WebMCP reservation page has nothing for these buttons to invoke — the agent layer simply doesn't exist there.

Path 3 — Real Auto Browser test

What it looks like: Visitor installs Auto Browser, points it at the demo URL, types natural language: "Book Ji Xing for CNY reunion dinner, Reunion Eve, 10 pax, no pork, private room, around RM 1,500 budget."

What's happening: Auto Browser does the LLM reasoning, decides which tools to chain (searchSetMenuscheckAvailabilityreserveTable), calls them via navigator.modelContext, gets typed JSON back. The requestUserInteraction() modal pauses for explicit human confirmation before placing the booking. The LLM cost belongs to Auto Browser, not the merchant.

Cost: zero on the merchant side. Difference vs non-WebMCP page: Auto Browser cannot reliably book a multi-step reservation on a non-WebMCP page — it would screenshot the date picker, guess at the right sitting button, miss the dietary dropdown, and abandon the form mid-fill.

The merchant-side cost story

This is the strongest WebMCP value for Malaysian SMEs: agent-ready festival booking with zero ongoing AI cost — agents pay their own way, every year.

Application Features

1. Multi-View SPA

Single-file static HTML with a state-driven view router across home / set-detail / booking / confirmation / manage. No backend, no framework, no build step. URL params support deep linking (?set=10b, ?ref=JX-CNY26-XXXXX).

2. Per-View Tool Scoping

The killer WebMCP feature: tool surface morphs as the user navigates. Home shows 2 tools (search, getDetails). Set Detail shows 2. Booking shows 2 (availability + reserve). Confirmation shows 1 (read-only). Manage shows 3 (get, modify, cancel). Destructive actions live only where the user is in that intent.

3. Inspector Panel (4 Tabs)

Floating panel demonstrates WebMCP is real, not a label. Tabs: Tools (live JSON schemas), Try as Agent (run any tool with sample params), Log (timestamped invocations), Source (the actual provideContext() code per view).

4. Availability Check (Killer Tool)

The CNY equivalent of Sunny's checkFitment: checkAvailability({date, sitting, partySize, seatingType}) returns a typed JSON breakdown — main hall tables remaining, private rooms remaining, VIP room (10-pax Set B only). Pixel-clicking agents physically cannot reason about multi-bucket inventory like this.

5. requestUserInteraction() Gate

The reserveTable, modifyReservation, and cancelReservation tools all trigger a custom "Confirm / Cancel" modal before mutating state. Even a runaway agent cannot book or cancel a reservation without explicit human approval — bilingual modal text, destructive-action flag, accessible.

6. Bilingual UI Throughout

Every description, FAQ entry, course name, dietary option, button, and form label is bilingual (English + 中文). Targets MY's bilingual market without forcing a language toggle. Captures both English and Chinese keyword searches simultaneously.

7. Schema.org Structured Data

Three JSON-LD blocks: Restaurant (address, hours, price range, ReserveAction), FAQPage (15 Q&As marked up for rich snippets), and reservation lifecycle. Surfaces as rich SERP results — price range, hours, "Reserve" button visible directly in Google.

8. Compatibility Mode Fallback

WebMCP is in W3C incubation — most browsers don't yet expose navigator.modelContext. The Inspector detects this, shows an honest "⚠️ not detected" status, and the booking flow still works fully for human visitors. Custom-modal polyfill handles requestUserInteraction() on browsers without native support.

WebMCP Tool Surface (7 Tools)

searchSetMenuspax, maxPrice, dietary
getSetMenuDetailssetId
checkAvailability 🔑date, sitting, partySize, seatingType
reserveTablesetId, date, sitting, partySize, seatingType, dietary, customerName, phone, email (gated)
getReservationbookingRef (read-only)
modifyReservationbookingRef, newDietary, newSpecialRequests (gated)
cancelReservationbookingRef (gated, destructive)

Per-View Tool Mapping

Home2 tools: search + getDetails
Set Detail2 tools: getDetails + checkAvailability
Booking2 tools: checkAvailability + reserveTable (gated)
Confirmation1 tool: getReservation (read-only)
Manage3 tools: get + modify + cancel (both gated)

WebMCP Integration & Intelligence

Typed Contract over Pixel-Clicking

Each tool registers with a JSON inputSchema describing parameters, types, and constraints. The agent reads the schema and calls checkAvailability with structured parameters — no screenshot interpretation of the date grid, no DOM scraping of the sitting buttons, no broken assumptions when a designer ships a redesign.

Per-Page Surface (Pattern B)

On every view change, navigator.modelContext.provideContext({tools}) swaps the active tool set. The agent on the booking form sees reserveTable but loses access to cancelReservation — destructive tools live only on the page where the user is in that intent. cancelReservation is exposed only on the Manage view.

Human-in-the-Loop on Destructive Actions

Three tools call requestUserInteraction() before mutating state: reserveTable (places the reservation + 50% deposit), modifyReservation (changes existing booking), cancelReservation (with a destructive flag). The browser pauses agent execution and shows a bilingual confirmation prompt.

89% Token Efficiency vs Pixel-Clicking

Per the WebMCP spec: typed tool calls consume 20–100 tokens. Screenshot + DOM parsing typically consumes 2,000–5,000+ tokens per page. A full booking flow (search → details → check availability → reserve) on this page = 4 tool calls = ~120–400 tokens vs ~8,000–20,000 tokens for pixel-clicking the same flow.

Tier 1 Test Results — Verified 2026-05-03

End-to-end tested on Chrome 147 with experimental web platform features enabled. All five test cases passed:

Test What was checked Result
1A — Per-view tool scoping Inspector status badge updates: Home (2) → Set Detail (2) → Booking (2) → Confirmation (1) → Manage (3) ✓ Pass
1B — checkAvailability killer tool Clicking ▶ Run checkAvailability on Set Detail returns typed JSON with mainHall / privateRoom / vipRoom counts for Reunion Eve dinner-2 ✓ Pass
1C — requestUserInteraction() Running reserveTable from the Inspector triggers the bilingual confirmation modal before placing the reservation; cancelReservation shows the destructive-action variant ✓ Pass
1D — Peak-day rule enforcement checkAvailability rejects lunch sittings on Reunion Eve (16 Feb) and Day 1 (17 Feb) with a typed error — kitchen prep + staff family time ✓ Pass
1E — VIP Room exclusivity reserveTable with seatingType: "vipRoom" rejects all sets except 10-pax Set B (Lucky Star Signature) — preserves the bundled-tier exclusivity ✓ Pass
Browser-support disclaimer. WebMCP is in W3C incubation as of May 2026. The navigator.modelContext API is currently flag-gated even on Chrome 147 stable — the spec's "146+ stable" claim is aspirational; live API access requires chrome://flags/#enable-experimental-web-platform-features or a similar flag enabled.

On any browser without the API, the Inspector Panel runs in compatibility mode — it still demonstrates exactly what tools an agent would see, the per-view scoping, the JSON schemas, and the confirmation flow. Booking still works for human visitors via a custom-modal polyfill of requestUserInteraction(). The same code switches automatically to live agent integration the moment the browser enables WebMCP — no code change needed on this page.

To see the green ✅ today: Chrome 147 → chrome://flags → search "model context" or enable Experimental Web Platform Features → relaunch → reload the demo.

Restaurant Operating Model (Mock Data)

Realistic mid-tier Malaysian Chinese banquet restaurant — the actual Pau AI prospect profile:

Capacity30 tables (9 × 6-pax + 10 × 8-pax + 7 × 10-pax + 4 private rooms)
Booking-vs-walk-in15 / 15 per sitting (50/50 mid-tier MY pattern)
SittingsLunch 11:30am · Lunch 1:30pm · Dinner 6pm · Dinner 8:30pm
Peak day ruleReunion Eve + Day 1 = dinner only
Lead time24 hours minimum
CancellationFree ≥48hrs · 50% forfeit · full forfeit on no-show
Deposit50% at booking
Booking ref formatJX-CNY26-XXXXX
Halal statusNon-halal · No-pork option on every set
Private room ruleAvailable for all sets except 10-pax Set B (VIP Room bundled)

For the full operating spec see restaurant outline.md; for the architecture spec see app outline.md — both shipped with the project folder.

Technical Architecture & Implementation

Frontend Stack

HTML5 CSS3 Vanilla JavaScript Poppins Font Noto Sans SC localStorage

WebMCP Stack

navigator.modelContext (W3C) provideContext() requestUserInteraction() Custom-modal polyfill

SEO Stack

Schema.org Restaurant ReserveAction FAQPage OpenGraph Twitter Card Bilingual content (EN + 中文)

Deployment

GitHub Pages Static Single-File HTML No Backend No Build Step

System Architecture

Production Deployment Notes

This demo runs entirely in the browser as a static page. For a real merchant deployment, the following would be added:

Required for Production

Architecture Comparison

DEMO (this page): Customer Browser → static HTML → localStorage last-booking → mocked deposit // Single user, single tab, no real persistence PRODUCTION: Customer Browser → CDN-served HTML → backend API → Reservation DB (PostgreSQL/Firestore) → Payment processor (Stripe/iPay88) for 50% deposit → Email/SMS service (SendGrid/Twilio) for confirmation → Host-stand dashboard (kitchen real-time view) + WebMCP Origin Trial token in <meta> tag + agent-traffic analytics (submitEvent.agentInvoked → log to BigQuery) + Server-side double-booking check before reserve completes + Slot release on cancellation

Development Setup & Testing Guide

Prerequisites

Quick Start

# Clone the repository git clone https://github.com/lyven81/ai-project.git cd ai-project/projects/ji-xing-cny-reservation # Open the demo directly in any browser # Windows: start index.html # Mac: open index.html # Or run a local server (recommended for Auto Browser testing): python -m http.server 8000 # Then visit http://localhost:8000/

Console Verification (paste into DevTools)

'modelContext' in navigator; // → true (Chrome 146+ with flags) or false (compat mode) navigator.modelContext.tools.map(t => t.name); // → list of tools registered on the current view await TOOLS.checkAvailability.execute({ date: '2026-02-16', sitting: 'dinner-2', partySize: 10 }); // → { type: "json", data: { tablesRemaining: { mainHall: 1, privateRoom: 0, vipRoom: 0 }, ... } } // Try the demo lookup await TOOLS.getReservation.execute({ bookingRef: 'JX-CNY26-DEMO1' }); // → seeded test reservation

Auto Browser Test Prompts

Prompt 1: "Find me a CNY reunion dinner at Ji Xing for 10 people, no pork, around RM 1,500 budget." Prompt 2: "Book Ji Xing for Reunion Eve dinner, 6 pax, vegetarian, private room if available." Prompt 3: "Look up booking JX-CNY26-DEMO1 and change the dietary preference to vegetarian."

Project Files

projects/ji-xing-cny-reservation/ index.html # Main app — multi-view SPA + WebMCP layer + Inspector Panel README.md # Project description + Auto Browser test instructions images/ logo.jpeg # 吉 brand mark hero.jpeg # CNY banquet hero banner menus/ # 6 set-menu hero images (1024×1024, AI-generated) 6-pax-set-a.jpeg 6-pax-set-b.jpeg 8-pax-set-a.jpeg 8-pax-set-b.jpeg 10-pax-set-a.jpeg 10-pax-set-b.jpeg menu/ # Per-set markdown reference (6 files)

Key Metrics

7
WebMCP Tools Registered
6
CNY Set Menus (RM 688–1,288)
480
Bookable slots over 9 days
89%
Token reduction vs pixel-clicking
5/5
Tier 1 tests passed
100%
Bilingual coverage (EN + 中文)

Business Value