Skip to main content
Glama

Choose HTML or React

set_app_mode

Choose 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

NameRequiredDescriptionDefault
modeYes
siteYesSite slug (e.g. "kopitiam-muar") or id
routesNoPage paths the app handles besides "/", e.g. ["about", "menu", "item/:id"] (":id" matches any value, e.g. /item/42). Replaces the saved list.
starterNo
owner_requestNoOnly with mode "html": what the owner said when they asked for plain HTML/CSS/JS, in their words. Never fill it in yourself.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / owner_request
      Added value: +{
      +  "description": "Only with mode \"html\": what the owner said when they asked for plain HTML/CSS/JS, in their words. Never fill it in yourself.",
      +  "maxLength": 300,
      +  "type": "string"
      +}
  2. Added

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the mutation/safety profile is partly covered. The description still adds real value beyond them: files are kept either way, an html switch without owner_request is refused, the call returns the React guide, and starter:true writes three named files when src/ is empty. It does not cover the returned guide's format beyond a phrase, but the behavioral disclosure is well above the annotation baseline.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with a clear purpose and the mode distinction, which is good. However the long flat list of ~35 approved npm packages is bulk that duplicates what the tool itself returns as the React guide, so several lines do not earn their place in the definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter mutation tool with no output schema, the description covers the switching semantics, the guard on html mode, starter side effects, and the return value. The routes parameter's replacement behavior is left entirely to the schema, which is the one remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 60%, and the description compensates by explaining what each mode value actually means ("react" = app in src/ bundled by the server; "html" = plain HTML/CSS/JS pages) and by giving usage rules for owner_request ("pass what they said", "never fill it in yourself") and starter. Only routes goes undiscussed in the description, relying on the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opening sentence states a specific verb and object ("Choose how a site is built") and immediately distinguishes itself from the sibling that creates sites: "New sites start as React apps (create_site); use this to switch." An agent can tell exactly what this tool does versus create_site without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing rules both ways: react is the default path for new work, and html is "only when the owner asked for plain HTML, CSS and JS in their own words", with a named consequence ("or the switch is refused"). The alternative tool create_site is named, and the prerequisite for the html path is spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources