Skip to main content
Glama
Tai-DT
by Tai-DT

create_theme

Generate custom Tailwind CSS themes with AI assistance by providing a brand color and design preferences to create color palettes, typography scales, and configuration files.

Instructions

Generate custom Tailwind theme with AI assistance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brandColorYesPrimary brand color (hex, rgb, or color name)
styleNoDesign stylemodern
colorCountNoNumber of color shades to generate
includeConfigNoGenerate tailwind.config.js
typographyNoInclude typography scale
spacingNoInclude custom spacing scale

Implementation Reference

  • Placeholder implementation of the create_theme tool handler function, imported and called by the MCP server.
    export async function createTheme(args: ThemeCreationOptions) {
      return {
        content: [
          {
            type: 'text',
            text: `Created theme: ${args.name}\nStyle: ${args.style}\nPrimary Color: ${args.primaryColor || 'auto'}`
          }
        ]
      };
    }
  • Tool definition including input schema for 'create_theme' in the TOOLS array used for listing tools.
    {
      name: 'create_theme',
      description: 'Generate custom Tailwind theme with AI assistance',
      inputSchema: {
        type: 'object',
        properties: {
          brandColor: {
            type: 'string',
            description: 'Primary brand color (hex, rgb, or color name)'
          },
          style: {
            type: 'string',
            enum: ['minimal', 'modern', 'classic', 'bold', 'elegant'],
            default: 'modern',
            description: 'Design style'
          },
          colorCount: {
            type: 'number',
            default: 9,
            minimum: 5,
            maximum: 11,
            description: 'Number of color shades to generate'
          },
          includeConfig: {
            type: 'boolean',
            default: true,
            description: 'Generate tailwind.config.js'
          },
          typography: {
            type: 'boolean',
            default: true,
            description: 'Include typography scale'
          },
          spacing: {
            type: 'boolean',
            default: true,
            description: 'Include custom spacing scale'
          }
        },
        required: ['brandColor']
      }
    },
  • src/index.ts:439-440 (registration)
    Dispatch in the CallToolRequestSchema handler that routes 'create_theme' calls to the createTheme function.
    case 'create_theme':
      return await createTheme(args as unknown as ThemeCreationOptions);
  • TypeScript interface defining the expected input shape for the create_theme tool parameters.
    export interface ThemeCreationOptions {
      name: string;
      style: 'modern' | 'classic' | 'minimal' | 'vibrant' | 'dark' | 'corporate' | 'creative' | 'custom';
      primaryColor?: string;
      accentColor?: string;
      baseColors?: 'neutral' | 'warm' | 'cool' | 'custom';
      typography?: 'sans' | 'serif' | 'mono' | 'custom';
      borderRadius?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
      shadows?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
      spacing?: 'tight' | 'normal' | 'relaxed' | 'loose';
      generateVariants?: boolean;
      includeDarkMode?: boolean;
      accessibility?: boolean;
      framework?: 'tailwind' | 'css-variables' | 'scss' | 'both';
    }
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 'Generate[s]' with 'AI assistance', implying a creation/mutation operation, but doesn't specify output format (e.g., JSON, CSS file), whether it's idempotent, or any rate limits or authentication needs. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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 that front-loads the core purpose ('Generate custom Tailwind theme with AI assistance'). It wastes no words and is appropriately sized for the tool's complexity, making it easy for an agent to parse quickly without unnecessary elaboration.

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

Completeness3/5

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

Given the tool's moderate complexity (6 parameters, no output schema, no annotations), the description is minimally adequate. It clarifies the purpose but lacks usage guidelines and behavioral details. Without an output schema, it doesn't explain return values (e.g., theme object or config file), leaving the agent to infer results. This makes it incomplete for optimal tool selection and invocation.

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?

The input schema has 100% description coverage, providing clear details for all 6 parameters (e.g., 'brandColor' as primary color, 'style' as design style with enum). The description adds no parameter-specific information beyond what's in the schema, such as explaining how 'AI assistance' influences parameter usage. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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

Purpose4/5

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

The description clearly states the action ('Generate') and resource ('custom Tailwind theme'), specifying it's done 'with AI assistance'. It distinguishes from siblings like 'analyze_design' or 'convert_to_tailwind' by focusing on theme creation rather than analysis, conversion, or other design tasks. However, it doesn't explicitly differentiate from 'create_layout' or 'create_project', which might also involve creation aspects.

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 prerequisites, such as needing a brand color, or compare it to siblings like 'convert_to_tailwind' for existing themes or 'suggest_improvements' for modifications. Without this context, the agent must infer usage from the tool name and parameters alone.

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/Tai-DT/mcp-tailwind-gemini'

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