Skip to main content
Glama
jonthebeef

Superdesign MCP Server

by jonthebeef

superdesign_iterate

Generate design variations by applying feedback to existing files, enabling iterative UI improvements through structured instructions.

Instructions

Returns iteration instructions based on existing design and feedback

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
design_fileYesPath to existing design file to iterate on
feedbackYesFeedback for improving the design
variationsNoNumber of design variations to create

Implementation Reference

  • Handler function for superdesign_iterate tool that parses input, reads existing design file, generates new iteration file names, constructs detailed prompt with original content and feedback for Claude to create improved variations, and returns the specification text.
    case "superdesign_iterate": { const { design_file, feedback, variations } = IterateDesignSchema.parse(args); if (!existsSync(design_file)) { return { content: [{ type: "text", text: `Error: Design file ${design_file} does not exist` }], }; } const originalContent = readFileSync(design_file, 'utf8'); const superdesignDir = getSuperdeignDirectory(); const designIterationsDir = path.join(superdesignDir, 'design_iterations'); const baseName = path.basename(design_file, path.extname(design_file)); const extension = path.extname(design_file).substring(1); // Create file list for iterations const fileList = []; for (let i = 1; i <= variations; i++) { fileList.push(`${baseName}_${i}.${extension}`); } let specifications = `DESIGN ITERATION SPECIFICATION FOR CLAUDE CODE: IMPORTANT: You must iterate on the existing design and save the improved versions. === ITERATION PARAMETERS === - Original file: ${design_file} - Feedback: ${feedback} - Files to create: ${variations} improved variations - File format: ${extension.toUpperCase()} === FILES TO CREATE === ${fileList.map((file, index) => `${index + 1}. ${path.join(designIterationsDir, file)}`).join('\n')} === ORIGINAL DESIGN === ${originalContent} === ITERATION GUIDELINES === 1. Analyze the original design above 2. Apply the following feedback: ${feedback} 3. Create ${variations} different improvements based on the feedback 4. Each variation should interpret the feedback slightly differently 5. Maintain the core structure while implementing improvements 6. Follow all Superdesign guidelines === SUPERDESIGN SYSTEM PROMPT === ${SUPERDESIGN_SYSTEM_PROMPT} === EXECUTION INSTRUCTIONS === 1. Read and understand the original design 2. Generate ${variations} improved variations based on the feedback 3. Save each variation with the exact filenames listed above 4. Ensure each iteration is an improvement while maintaining design consistency Please proceed to create these ${variations} improved design files now.`; return { content: [{ type: "text", text: specifications }], }; }
  • Zod schema for validating input parameters: design_file (required string), feedback (required string), variations (optional number 1-5, default 3).
    const IterateDesignSchema = z.object({ design_file: z.string().describe("Path to existing design file to iterate on"), feedback: z.string().describe("Feedback for improving the design"), variations: z.number().min(1).max(5).default(3).describe("Number of design variations to create") });
  • Tool registration in the list of available tools returned by ListToolsRequestHandler, including name, description, and input schema matching the Zod schema.
    { name: "superdesign_iterate", description: "Returns iteration instructions based on existing design and feedback", inputSchema: { type: "object", properties: { design_file: { type: "string", description: "Path to existing design file to iterate on" }, feedback: { type: "string", description: "Feedback for improving the design" }, variations: { type: "number", minimum: 1, maximum: 5, default: 3, description: "Number of design variations to create" } }, required: ["design_file", "feedback"], }, },

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