Skip to main content
Glama

generate_tailwind_classes

Generate Tailwind CSS utility classes for spacing, colors, typography, layout, and effects to style React components efficiently.

Instructions

Generate Tailwind utility classes for specific use cases

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes
valuesNo

Implementation Reference

  • MCP server handler for the generate_tailwind_classes tool. Parses input using schema and delegates to utilityTools.generateTailwindClasses
    case "generate_tailwind_classes": {
      const { type, values } = GenerateTailwindClassesSchema.parse(args);
      const classes = utilityTools.generateTailwindClasses(type, values);
      return {
        content: [
          {
            type: "text",
            text: classes,
          },
        ],
      };
    }
  • Core implementation of generateTailwindClasses that switches on type and calls specific generators for Tailwind utility classes
    generateTailwindClasses(type: string, values?: Record<string, any>): string {
      switch (type) {
        case "spacing":
          return this.generateSpacingClasses(values);
        case "colors":
          return this.generateColorClasses(values);
        case "typography":
          return this.generateTypographyClasses(values);
        case "layout":
          return this.generateLayoutClasses(values);
        case "effects":
          return this.generateEffectClasses(values);
        default:
          return "// Unknown type";
      }
    },
  • Zod schema for validating input to generate_tailwind_classes tool: type (required enum) and optional values
    const GenerateTailwindClassesSchema = z.object({
      type: z.enum(["spacing", "colors", "typography", "layout", "effects"]),
      values: z.record(z.any()).optional(),
    });
  • src/index.ts:232-246 (registration)
    Tool registration in list_tools response, defining name, description, and input schema matching the Zod schema
    {
      name: "generate_tailwind_classes",
      description: "Generate Tailwind utility classes for specific use cases",
      inputSchema: {
        type: "object",
        properties: {
          type: {
            type: "string",
            enum: ["spacing", "colors", "typography", "layout", "effects"],
          },
          values: { type: "object" },
        },
        required: ["type"],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates utility classes but doesn't explain how (e.g., returns a string, modifies a file), what permissions are needed, whether it's idempotent, or any rate limits. This leaves significant gaps for a tool with 2 parameters and no output schema.

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

Conciseness5/5

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

The description is a single, efficient sentence with no wasted words. It's appropriately sized for a simple tool and front-loaded with the core purpose, though it lacks detail due to under-specification rather than conciseness.

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

Completeness2/5

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

Given the tool's complexity (2 parameters, no annotations, no output schema, 0% schema coverage), the description is incomplete. It doesn't explain what the tool returns, how parameters interact, or behavioral traits, making it inadequate for an AI agent to use effectively without guesswork.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'specific use cases' but doesn't explain the 'type' enum (spacing, colors, etc.) or the 'values' object. This adds minimal meaning beyond the bare schema, failing to address the coverage gap.

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

Purpose3/5

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

The description states the tool's purpose as generating Tailwind utility classes for specific use cases, which is clear but vague. It specifies the verb 'generate' and resource 'Tailwind utility classes', but doesn't distinguish from siblings like 'configure_theme' or 'generate_component', and 'specific use cases' is imprecise.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention siblings like 'configure_theme' or 'generate_component', nor does it specify prerequisites, exclusions, or appropriate contexts for generating utility classes versus other Tailwind-related operations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/its-just-ui/its-just-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server