Skip to main content
Glama

Add shadcn/ui components

add_shadcn
Destructive

For React sites: set the site up for Tailwind CSS and shadcn/ui and add components to src/components/ui/ (button, card, dialog, drawer = bottom sheet, sheet = side panel, carousel, tabs, accordion, form, select, sonner toasts, ...). A modern, less "templated" look than MUI, and every component is a file in the site that can be restyled. Writes src/tailwind.css (Tailwind plus the theme: colours and corner radius as CSS variables), src/lib/utils.ts and the components with what they need, and loads the stylesheet from src/main.jsx. Call it without components to see what exists. Then import them, e.g. import { Button } from "@/components/ui/button", style with Tailwind classes, and build_app. Use either shadcn/ui or MUI for a site's own pages, not both.

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": "add_shadcn"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesSite slug (e.g. "kopitiam-muar") or id
radiusNoCorner radius, e.g. "0.5rem"; "0rem" for square corners
primaryNoBrand colour for buttons and highlights, e.g. "#0f766e"
overwriteNoReplace components already in the site (they may have been edited)
base_colorNoGrey scale of the theme (default neutral)
componentsNoComponent names, e.g. ["button", "card", "drawer"]. What they need is added too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, openWorldHint=false and readOnlyHint=false, so the description's job is to say what is touched; it does exactly that by listing src/tailwind.css, src/lib/utils.ts, the component files and the stylesheet load in src/main.jsx. It stops short of warning that these existing files may be replaced or that re-running on an already-configured site could clobber prior edits, so the destructive edge is implied rather than spelled out.

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-loaded with the scope ("For React sites") and packed with decision-relevant detail; the parenthetical component list and import example both earn their place. The single dense paragraph mixes setup, file writes and next steps together, which makes it harder to scan than a short bulleted shape would be.

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 6-parameter mutation tool with no output schema, the description covers what it installs, where files land, how to discover existing components and what to do afterward. What remains thin is the overwrite/return behavior on repeat invocation, which the agent would want before calling it on a configured site.

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 100%, but the description still adds meaning: components is described as a discovery switch when omitted, with concrete examples, and the component names are glossed in UI terms (drawer as bottom sheet, sheet as side panel). radius, primary and base_color are left to the schema, so it is additive rather than duplicative.

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?

States a specific verb and resource ("set the site up for Tailwind CSS and shadcn/ui and add components to src/components/ui/") and even enumerates the component vocabulary, including drawer = bottom sheet and sheet = side panel. It clearly separates itself from the MUI route by saying to use one or the other for a site's own pages.

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 when-to-use framing ("For React sites"), a discovery mode ("Call it without components to see what exists"), a follow-on workflow (import from @/components/ui/button, style with Tailwind, then build_app), and a stated exclusion against MUI. Alternatives and conditions are named rather than inferred.

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