Preflight brand check
brand_preflightValidate HTML/CSS against brand rules to catch off-brand colors, wrong fonts, missing logos, and anti-patterns; optionally render pages to verify computed styles, contrast, and logo presence.
Instructions
Check HTML/CSS against brand rules — catches off-brand colors, wrong fonts, missing logo, and anti-pattern violations (drop shadows, gradients, etc.). Pass an HTML string or file path. Mode 'check' (default) runs static source checks. Add render=true to render the page in sandboxed headless Chrome (all network blocked) and verify the COMPUTED result: actual colors vs palette (CIEDE2000), the font face that really renders, WCAG AA text contrast, logo presence, optional screenshot to .brand/checks/. Use after building any page or component, or when the user asks 'does this look on-brand?', 'check my page', or 'verify the design'. Mode 'rules' lists active rules. Returns overall PASS/WARN/FAIL, a score, and per-finding details (locator, measured value, nearest brand value, severity). NOT for scoring content copy — use brand_audit_content. NOT for brand directory validation — use brand_audit.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"html": "<html>"
},
"name": "brand_preflight"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | HTML to validate: either a full HTML string (with <style> blocks) or a file path ending in .html (e.g. 'output.html') | |
| mode | No | 'check' (default): validates HTML against all brand rules. 'rules': lists all active rules without running checks. | check |
| render | No | true: render the HTML in sandboxed headless Chrome with ALL network blocked and check the computed result — actual colors vs the palette (CIEDE2000), the font face that really renders, WCAG AA text contrast, logo presence. Local CSS/JS/fonts/images inside the working directory are inlined first. Requires Chrome/Chromium. Default false (static source checks). | |
| viewport | No | Viewport for render=true: 'desktop' 1280x800 (default), 'tablet' 768x1024, 'mobile' 390x844 | desktop |
| screenshot | No | With render=true: save a PNG of the rendered page under .brand/checks/ and return its path so you can show the user | |
| max_findings | No | With render=true: maximum findings returned, most severe first (default 12, max 50) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _metadata | Yes |