Skip to main content
Glama

Build the React shop

build_react_shop
Destructive

For React sites (set_app_mode react) with a linked Komers store: write the storefront as React components (MUI) in src/shop/ with the layout the owner chose on phones and desktop: product list, product details (full page, popup, bottom sheet or side panel), cart (drawer, bottom sheet or full screen), categories and menu bar. Checkout goes through Komers like build_shop: options and add-ons, opening hours and order-ahead pickup slots, delivery methods, branches. Product pages /p// keep their server-rendered share tags and Product data. Ask the owner first with shop_layout_options. Re-running replaces src/shop/ (edit layout.json or the components afterwards if you like).

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>"
    },
    "name": "build_react_shop"
  }
}

Input Schema

NameRequiredDescriptionDefault
uiNoWhich kit the shop is built with. Default: the component style in the brief (ui_kit), else shadcn when the site uses Tailwind/shadcn (add_shadcn), else mui. The shadcn shop follows the theme in src/tailwind.css and ships no MUI.
pageNo"shop" = the shop at /shop (the home page stays the app), "index" = the home page is the shopshop
siteYesSite slug (e.g. "kopitiam-muar") or id
introNo
mobileNoChoices for phones, e.g. { "detail": "sheet", "nav": "bottom" }
presetNoReady-made style; desktop/mobile choices override its parts
desktopNoChoices for wide screens, e.g. { "detail": "modal", "cart": "drawer" }
headingNoShop
layout_decided_byNo"owner" when the owner picked the layout (the normal case); "ai" only when the owner explicitly asked you to decideowner

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / layout_decided_by
      Added value: +{
      +  "default": "owner",
      +  "description": "\"owner\" when the owner picked the layout (the normal case); \"ai\" only when the owner explicitly asked you to decide",
      +  "enum": [
      +    "owner",
      +    "ai"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / ui / description
      Previous value: -"Which kit the shop is built with. Default: shadcn when the site uses Tailwind/shadcn (add_shadcn), else mui. The shadcn shop follows the theme in src/tailwind.css and ships no MUI."New value: +"Which kit the shop is built with. Default: the component style in the brief (ui_kit), else shadcn when the site uses Tailwind/shadcn (add_shadcn), else mui. The shadcn shop follows the theme in src/tailwind.css and ships no MUI."
  2. Changed1 schema field changed
    • addedInput schema / properties / ui
      Added value: +{
      +  "description": "Which kit the shop is built with. Default: shadcn when the site uses Tailwind/shadcn (add_shadcn), else mui. The shadcn shop follows the theme in src/tailwind.css and ships no MUI.",
      +  "enum": [
      +    "mui",
      +    "shadcn"
      +  ],
      +  "type": "string"
      +}
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false; the description earns credit by explaining exactly what is destroyed — "Re-running replaces src/shop/" — and by offering a recovery path (edit layout.json or the components afterwards). It also discloses a subtle behavior, that /p/<id>/<name> pages keep their server-rendered share tags and Product data. It doesn't cover error/permission conditions beyond the Komers link requirement.

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

Conciseness4/5

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

Front-loads the applicability condition and the core action, then flows through layout, checkout, routing, and the replacement caveat. Dense but mostly earning its place; the checkout enumeration (options, add-ons, hours, pickup slots, delivery, branches) is the one stretch that reads as padding for a tool whose parameters don't include any of it.

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 destructive, 9-parameter, nested-object tool with no output schema, the description covers prerequisites, side effects, backtracking, and downstream checkout behavior. What's left out — how a preset interacts with explicit desktop/mobile overrides, and what ui selection changes in output — is a modest gap rather than a blocker.

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

Parameters3/5

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

Schema coverage is 78%, so the schema already documents most of the 9 parameters. The description adds some framing — the desktop/mobile objects represent "the layout the owner chose", and choosing it relates to consulting shop_layout_options — but it never explains preset, ui, page, intro, heading, or layout_decided_by, so it stays at the baseline for a well-documented 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?

Names a specific verb and artifact: "write the storefront as React components (MUI) in src/shop/", plus what it composes (product list, details, cart, categories, menu bar). The scoping clause "For React sites (set_app_mode react) with a linked Komers store" and the reference to "build_shop" let an agent separate this from the non-React builder without opening a schema.

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

Usage Guidelines4/5

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

Gives explicit preconditions (React app mode, linked Komers store) and a mandatory workflow step: "Ask the owner first with shop_layout_options", naming a sibling tool. It doesn't explicitly state the negative case (use build_shop when the site isn't React), but the precondition makes the exclusion inferable.

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