Skip to main content
Glama

superdesign_generate

Generate UI designs, wireframes, components, logos, or icons from text prompts for Claude Code development projects.

Instructions

Returns design specifications for Claude Code to generate UI designs, wireframes, components, logos, or icons

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesDesign prompt describing what to create
design_typeYesType of design to generate
variationsNoNumber of design variations to create
frameworkNoFramework for UI componentshtml

Implementation Reference

  • Handler function for superdesign_generate tool. Parses input using GenerateDesignSchema, computes output directory and filenames, generates detailed specifications text for Claude Code to create design files, and returns it as tool response.
            const superdesignDir = getSuperdeignDirectory();
            const designIterationsDir = path.join(superdesignDir, 'design_iterations');
            const baseName = generateBaseName(prompt);
            const extension = (design_type === 'logo' || design_type === 'icon') ? 'svg' : 'html';
            
            // Create file list for variations
            const fileList = [];
            for (let i = 1; i <= variations; i++) {
              fileList.push(`${baseName}_${i}.${extension}`);
            }
            
            // Build design specifications
            let specifications = `DESIGN SPECIFICATION FOR CLAUDE CODE:
    
    IMPORTANT: You must generate and save the following design files based on these specifications.
    
    === DESIGN PARAMETERS ===
    - Type: ${design_type}
    - Prompt: ${prompt}
    - Framework: ${framework}
    - Files to create: ${variations} variations
    - File format: ${extension.toUpperCase()}
    
    === FILES TO CREATE ===
    ${fileList.map((file, index) => `${index + 1}. ${path.join(designIterationsDir, file)}`).join('\n')}
    
    === DESIGN GUIDELINES ===
    ${design_type === 'wireframe' ? '- Create minimal black and white wireframes with no colors\n- Use simple line styles like Balsamiq\n- No annotations or decorative elements' : ''}
    ${design_type === 'component' ? `- Generate a single ${framework} component with mock data\n- Focus only on the component itself\n- Include proper component structure for ${framework}` : ''}
    ${design_type === 'logo' || design_type === 'icon' ? '- Create proper SVG code with vector graphics\n- Ensure SVG is valid and well-structured\n- Focus on clean, scalable design' : ''}
    ${design_type === 'ui' ? '- Create complete responsive HTML interface\n- Use Tailwind CSS via CDN\n- Follow all UI design guidelines below' : ''}
    
    === SUPERDESIGN SYSTEM PROMPT ===
    ${SUPERDESIGN_SYSTEM_PROMPT}
    
    === EXECUTION INSTRUCTIONS ===
    1. Create the superdesign/design_iterations directory if it doesn't exist
    2. Generate ${variations} unique variations of the ${design_type} based on the prompt: "${prompt}"
    3. Save each variation with the exact filenames listed above
    4. Each variation should be different but follow the same design brief
    5. Follow all Superdesign guidelines and constraints
    6. **AFTER ALL ${variations} FILES ARE COMPLETED**: Use the superdesign_gallery tool to generate and automatically open the gallery
    7. **DO NOT** open individual design files - only open the gallery at the end
    
    **WORKFLOW:**
    - Step 1-5: Create all design files
    - Step 6: Call superdesign_gallery tool (which will auto-open the gallery)
    - Step 7: User will see all designs in the integrated gallery interface
    
    Please proceed to create these ${variations} design files now, then automatically generate and open the gallery.`;
    
            return {
              content: [{ type: "text", text: specifications }],
            };
          }
    
          case "superdesign_iterate": {
  • Zod schema for validating input parameters of the superdesign_generate tool.
    const GenerateDesignSchema = z.object({
      prompt: z.string().describe("Design prompt describing what to create"),
      design_type: z.enum(["ui", "wireframe", "component", "logo", "icon"]).describe("Type of design to generate"),
      variations: z.number().min(1).max(5).default(3).describe("Number of design variations to create"),
      framework: z.enum(["html", "react", "vue"]).default("html").describe("Framework for UI components")
    });
  • src/index.ts:1933-1959 (registration)
    Tool registration in the listTools response, including name, description, and JSON schema matching the Zod schema.
    name: "superdesign_generate",
    description: "Returns design specifications for Claude Code to generate UI designs, wireframes, components, logos, or icons",
    inputSchema: {
      type: "object",
      properties: {
        prompt: { type: "string", description: "Design prompt describing what to create" },
        design_type: { 
          type: "string", 
          enum: ["ui", "wireframe", "component", "logo", "icon"],
          description: "Type of design to generate" 
        },
        variations: { 
          type: "number", 
          minimum: 1, 
          maximum: 5, 
          default: 3,
          description: "Number of design variations to create" 
        },
        framework: {
          type: "string",
          enum: ["html", "react", "vue"],
          default: "html",
          description: "Framework for UI components"
        }
      },
      required: ["prompt", "design_type"],
    },
  • Helper function to get or create the superdesign directory structure, used by the generate handler.
    function getSuperdeignDirectory(workspacePath?: string): string {
      const basePath = workspacePath || process.cwd();
      const superdesignDir = path.join(basePath, 'superdesign');
      
      if (!existsSync(superdesignDir)) {
        mkdirSync(superdesignDir, { recursive: true });
      }
      
      const designIterationsDir = path.join(superdesignDir, 'design_iterations');
      if (!existsSync(designIterationsDir)) {
        mkdirSync(designIterationsDir, { recursive: true });
      }
      
      const designSystemDir = path.join(superdesignDir, 'design_system');
      if (!existsSync(designSystemDir)) {
        mkdirSync(designSystemDir, { recursive: true });
      }
      
      return superdesignDir;
    }
  • Helper function to generate a base filename from the design prompt, used in handler.
    function generateBaseName(prompt: string): string {
      return prompt.toLowerCase().replace(/[^a-z0-9]/g, '_').substring(0, 20);
    }
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 'Returns design specifications' but doesn't clarify what that entails—e.g., whether it's a read-only operation, if it creates new files, rate limits, authentication needs, or what the output looks like. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 without unnecessary words. It directly states what the tool does ('Returns design specifications') and the scope ('for Claude Code to generate UI designs, wireframes, components, logos, or icons'), making it easy to parse quickly.

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 complexity (4 parameters, no output schema, no annotations), the description is incomplete. It doesn't address behavioral aspects like whether this tool creates or modifies files, what the output format is, or how it interacts with siblings. For a design generation tool with multiple parameters and no structured output information, more context is needed to be fully helpful.

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 description coverage is 100%, meaning all parameters are documented in the schema. The description doesn't add any parameter-specific details beyond what's in the schema (e.g., it doesn't explain how 'prompt' should be formatted or the implications of 'design_type' choices). With high schema coverage, the baseline score is 3, 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 tool's purpose: 'Returns design specifications for Claude Code to generate UI designs, wireframes, components, logos, or icons.' It specifies the verb ('Returns design specifications') and the resource/scope (various design types). However, it doesn't explicitly differentiate from sibling tools like superdesign_iterate or superdesign_gallery, which might have overlapping functionality.

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, when-not-to-use scenarios, or how it differs from siblings such as superdesign_iterate (which might be for iterative design) or superdesign_gallery (which might list existing designs). Usage is implied by the purpose but not explicitly stated.

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/jonthebeef/superdesign-mcp-claude-code'

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