Choose HTML or React
set_app_modeChoose how a site is built. New sites start as React apps (create_site); use this to switch. "react" = a React app in src/, bundled by the server: preview_site and publish_site build it automatically. React sites can use MUI, Tailwind with shadcn/ui (add_shadcn), motion for animation, embla-carousel-react or swiper for sliders, lightbox galleries, forms, charts and more. "html" = plain HTML/CSS/JS pages: only when the owner asked for plain HTML, CSS and JS in their own words; pass what they said as owner_request, or the switch is refused (files are kept either way). Returns the React guide (every package with its size and an example; get_site returns it again for a React site). starter: true writes a small starter app (src/main.jsx, src/App.jsx, src/styles.css) when src/ is empty. Approved npm packages (import by name, no install): react, react-dom, react-router, @mui/material, @mui/icons-material, @mui/lab, @mui/x-date-pickers, @mui/x-charts, @emotion/react, @emotion/styled, dayjs, motion, react-intersection-observer, react-countup, canvas-confetti, embla-carousel-react, swiper, yet-another-react-lightbox, recharts, react-markdown, lucide-react, react-hook-form, @tanstack/react-query, zustand, clsx, class-variance-authority, tailwind-merge, radix-ui, @base-ui/react, vaul, sonner, cmdk, react-day-picker, date-fns, input-otp, react-resizable-panels, next-themes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"site": "<site>",
"mode": "<mode>"
},
"name": "set_app_mode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| site | Yes | Site slug (e.g. "kopitiam-muar") or id | |
| routes | No | Page paths the app handles besides "/", e.g. ["about", "menu", "item/:id"] (":id" matches any value, e.g. /item/42). Replaces the saved list. | |
| starter | No | ||
| owner_request | No | Only with mode "html": what the owner said when they asked for plain HTML/CSS/JS, in their words. Never fill it in yourself. |