Skip to main content
Glama

superdesign_extract_system

Extract design system components and specifications from screenshots or images to analyze UI patterns and structure.

Instructions

Returns instructions for extracting design system from screenshot or image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_pathYesPath to screenshot/image to extract design system from

Implementation Reference

  • Handler function that validates the image_path input using ExtractDesignSystemSchema, checks if the image exists, constructs a detailed prompt (specifications) instructing an AI to extract a design system JSON from the image, and returns it as text content.
          case "superdesign_extract_system": {
            const { image_path } = ExtractDesignSystemSchema.parse(args);
            
            if (!existsSync(image_path)) {
              return {
                content: [{ type: "text", text: `Error: Image file ${image_path} does not exist` }],
              };
            }
    
            const superdesignDir = getSuperdeignDirectory();
            const designSystemDir = path.join(superdesignDir, 'design_system');
            
            let specifications = `DESIGN SYSTEM EXTRACTION SPECIFICATION FOR CLAUDE CODE:
    
    IMPORTANT: You must analyze the image and extract a design system JSON file.
    
    === EXTRACTION PARAMETERS ===
    - Image path: ${image_path}
    - Output location: ${designSystemDir}/design-system.json
    
    === EXTRACTION GUIDELINES ===
    Analyze the screenshot/image and extract:
    1. Color palette (primary, secondary, neutrals)
    2. Typography rules (font families, sizes, weights, line heights)
    3. Spacing system (margin/padding values)
    4. Layout structure (grid system, containers)
    5. Component styles (buttons, inputs, cards, etc.)
    6. Visual effects (shadows, borders, radius values)
    
    === OUTPUT FORMAT ===
    Create a JSON file with this structure:
    {
      "colors": {
        "primary": {...},
        "secondary": {...},
        "neutrals": {...}
      },
      "typography": {
        "fontFamilies": {...},
        "sizes": {...},
        "weights": {...}
      },
      "spacing": {...},
      "components": {
        "buttons": {...},
        "inputs": {...},
        ...
      },
      "effects": {...}
    }
    
    === EXECUTION INSTRUCTIONS ===
    1. Analyze the image at ${image_path}
    2. Extract ONLY design patterns, not content
    3. Create a reusable design system
    4. Save as ${designSystemDir}/design-system.json
    5. If file exists, create design-system_2.json, etc.
    
    Please proceed to analyze the image and create the design system JSON file now.`;
    
            return {
              content: [{ type: "text", text: specifications }],
            };
          }
  • Zod schema defining the input for the tool: requires image_path as a string describing the path to the screenshot/image.
    const ExtractDesignSystemSchema = z.object({
      image_path: z.string().describe("Path to screenshot/image to extract design system from")
    });
  • src/index.ts:1981-1991 (registration)
    Registration of the tool in the ListToolsRequestSchema handler, including name, description, and input schema.
      name: "superdesign_extract_system",
      description: "Returns instructions for extracting design system from screenshot or image",
      inputSchema: {
        type: "object",
        properties: {
          image_path: { type: "string", description: "Path to screenshot/image to extract design system from" }
        },
        required: ["image_path"],
      },
    },
    {
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 states this is a read operation ('Returns instructions'), which is clear, but lacks details on permissions, rate limits, output format, or any side effects. For a tool with zero annotation coverage, 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 directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to understand at a glance with zero waste.

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 no annotations and no output schema, the description is incomplete for a tool that returns instructions. It doesn't explain what the instructions entail, their format, or any behavioral traits. For a tool with this complexity and lack of structured data, the description should provide more context 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?

The schema description coverage is 100%, with the single parameter 'image_path' well-documented in the schema. The description adds no additional meaning beyond what the schema provides, such as supported image formats or constraints. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 ('Returns instructions') and target resource ('extracting design system from screenshot or image'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'superdesign_generate' or 'superdesign_iterate' which might also involve design system operations, missing explicit sibling distinction.

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?

No guidance is provided on when to use this tool versus alternatives like 'superdesign_generate' or 'superdesign_iterate'. The description implies usage for extracting from images but doesn't specify prerequisites, exclusions, or comparative contexts with other tools in the server.

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