Skip to main content
Glama

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"],
        },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions returning 'iteration instructions' but doesn't specify what these instructions entail (e.g., text descriptions, code snippets, or structured data), whether it's a read-only or mutating operation, or any constraints like rate limits or authentication needs. This leaves significant gaps for an agent to understand the tool's 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 action ('Returns iteration instructions') and includes essential context ('based on existing design and feedback'). There is no wasted verbiage, and every word contributes to understanding the tool's purpose.

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 of a design iteration tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain the output format (what 'iteration instructions' look like), error conditions, or behavioral traits like whether it modifies files or is idempotent. This leaves the agent with critical unknowns for proper 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 parameters (design_file, feedback, variations). The description adds minimal value beyond the schema by implying that 'feedback' is used for 'improving the design', but it doesn't explain parameter interactions or provide additional context like format examples. This meets the baseline for high schema coverage.

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 with a specific verb ('Returns') and resource ('iteration instructions'), and it specifies the inputs ('based on existing design and feedback'). However, it doesn't explicitly differentiate from sibling tools like 'superdesign_generate' or 'superdesign_extract_system', which might have overlapping functions.

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 (e.g., needing an existing design file), exclusions, or comparisons to siblings like 'superdesign_generate' for new designs or 'superdesign_extract_system' for analysis.

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