Skip to main content
Glama

Inspect & Reverse-Engineer Website Style

ink_inspect_website_style
Read-onlyIdempotent

Extract a website's color palette, typography, shadows, and layout from HTML/CSS, then convert them into OKLCH design tokens for reuse.

Instructions

PURPOSE: Deconstruct existing live websites or HTML/CSS templates to reverse-engineer color palettes, typography scales, elevation shadows, and layout DNA into modern OKLCH tokens.

BEHAVIOR: Fetches public website markup over HTTPS or parses local HTML/CSS code strings in-memory. Strictly read-only with zero disk modifications. Remote network requests enforce a 10s timeout, safe redirect limits, and private subnet IP blocking. Converts extracted HEX/RGB values into perceptual OKLCH color variables.

USAGE GUIDELINES:

  • When to use: Use when analyzing a reference website or mockup to extract its visual hierarchy, typography system, and color ramps.

  • When NOT to use: Do NOT use to generate novel color tokens from scratch (use ink_generate_palette_tokens instead) or to evaluate code for anti-slop compliance (use ink_validate_design instead).

  • Alternatives: Use ink_generate_palette_tokens to synthesize new design tokens; use ink_capture_viewport to capture visual screenshots.

RETURNS: ResultEnvelope containing detected 'archetype', extracted 'colors' (with HEX and OKLCH conversions), 'typography' hierarchy, 'shadows', 'layoutDna', and an actionable recommended OKLCH palette stylesheet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlOrCodeYesPublic website URL (e.g. 'https://stripe.com') or raw HTML/CSS code snippet to reverse-engineer
extractOklchPaletteNoWhen true, converts extracted HEX and RGB colors into perceptual OKLCH color tokens

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesDomain-specific typed payload returned by the tool
statusYesExecution outcome status
summaryYesConcise, human-readable executive summary of the tool outcome
evidenceNoAudit trail, source references, and generated artifact locations
warningsYesOperational cautions, craft advice, or non-blocking warnings
nextActionsNoActionable sequential recommendations or subsequent tool suggestions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.0
    • changedInput schema / properties / extractOklchPalette / description
      Previous value: -"Convert extracted HEX/RGB colors into perceptual OKLCH tokens"New value: +"When true, converts extracted HEX and RGB colors into perceptual OKLCH color tokens"
    • changedInput schema / properties / urlOrCode / description
      Previous value: -"Target website URL (e.g. https://example.com) or raw HTML/CSS to reverse-engineer"New value: +"Public website URL (e.g. 'https://stripe.com') or raw HTML/CSS code snippet to reverse-engineer"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "description": "Domain-specific typed payload returned by the tool",
      +      "properties": {
      +        "archetype": {
      +          "description": "Detected aesthetic archetype (editorial, luxury-dark, brutalist, cyber-tactile, organic)",
      +          "type": "string"
      +        },
      +        "colors": {
      +          "description": "Extracted colors with HEX, RGB, OKLCH, and usage frequency",
      +          "items": {
      +            "additionalProperties": {},
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "layoutDna": {
      +          "additionalProperties": {},
      +          "description": "Layout DNA analysis (flexbox, grid, gap values, border radii)",
      +          "type": "object"
      +        },
      +        "recommendedOklchPalette": {
      +          "description": "Actionable CSS token block upgrade",
      +          "type": "string"
      +        },
      +        "shadows": {
      +          "description": "Extracted elevation shadow definitions",
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "typography": {
      +          "additionalProperties": {},
      +          "description": "Detected font families, font sizes, line heights, and weights",
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "archetype",
      +        "colors",
      +        "typography",
      +        "shadows",
      +        "layoutDna"
      +      ],
      +      "type": "object"
      +    },
      +    "evidence": {
      +      "additionalProperties": false,
      +      "description": "Audit trail, source references, and generated artifact locations",
      +      "properties": {
      +        "artifacts": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "label": {
      +                "type": "string"
      +              },
      +              "sha256": {
      +                "type": "string"
      +              },
      +              "uri": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "label"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "inputsDigest": {
      +          "type": "string"
      +        },
      +        "sources": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "label": {
      +                "type": "string"
      +              },
      +              "retrievedAt": {
      +                "type": "string"
      +              },
      +              "uri": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "label"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "nextActions": {
      +      "description": "Actionable sequential recommendations or subsequent tool suggestions",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "status": {
      +      "description": "Execution outcome status",
      +      "enum": [
      +        "success",
      +        "partial",
      +        "blocked",
      +        "failed"
      +      ],
      +      "type": "string"
      +    },
      +    "summary": {
      +      "description": "Concise, human-readable executive summary of the tool outcome",
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "description": "Operational cautions, craft advice, or non-blocking warnings",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "summary",
      +    "data",
      +    "warnings"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.1.0

TDQS

A4.7/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing network behavior: HTTPS fetching, 10-second timeout, safe redirect limits, private subnet IP blocking, in-memory parsing, strict read-only behavior, and OKLCH conversion. It also explicitly states 'zero disk modifications,' reinforcing the readOnlyHint. This is rich, non-redundant behavioral context.

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 structured with clear labeled sections: PURPOSE, BEHAVIOR, USAGE GUIDELINES, and RETURNS. Every sentence contributes useful information, and the most important purpose and safety traits are front-loaded. Despite its length, nothing is wasteful or redundant with the schema.

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

Completeness5/5

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

The description covers the tool's purpose, behavior, safety boundaries, usage conditions, alternatives, and a detailed summary of the return envelope. With an output schema present, the extra RETURNS section is a bonus rather than a requirement. An agent has everything needed to decide when and how to invoke this tool correctly.

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 already covers both parameters with clear descriptions, achieving 100% coverage, so the baseline of 3 applies. The description adds helpful context about OKLCH conversion and output shape, but it does not add much detail about the parameters themselves beyond what the schema provides. No deduction for missing parameter info is warranted.

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

Purpose5/5

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

The description opens with a specific verb phrase, 'Deconstruct existing live websites or HTML/CSS templates to reverse-engineer color palettes, typography scales, elevation shadows, and layout DNA,' which clearly identifies the tool's resource and goal. It also distinguishes itself from generation and validation siblings by naming alternatives. An agent can immediately understand what this tool does and what it produces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes explicit 'When to use' and 'When NOT to use' sections, naming sibling tools like ink_generate_palette_tokens and ink_validate_design as the correct alternatives for out-of-scope tasks. It also lists additional alternatives such as ink_capture_viewport. This gives an agent concrete decision rules for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.