kiyas

v1.4.0
io.github.saiffmirza/kiyas Checked 3 days ago Published 4 months ago

AI design fidelity — compare Figma designs or screenshots against rendered UI.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

compare

Compare a design against a rendered implementation and return discrepancies (measured on kiyas's golden eval set: 90% mutation recall, zero false positives on identical pairs). Provide `figma` (frame URL) or `designImage` (local path or URL of a design screenshot), plus either `target` (a URL) or `component` (natural-language description; kiyas finds it in the codebase). No Figma token needed for `designImage` — if a Figma MCP server is connected, export the frame as an image with its screenshot tool and pass that here. Returns a reportId you can pass to get_diff_report or list_issues.

ParameterTypeDescription
authStatestringPath to a Playwright storageState JSON file (cookies + localStorage). Lets kiyas screenshot authenticated views the same way your tests do. Generate with `npx playwright codegen --save-storage=auth.js…
colorSchemestringForce prefers-color-scheme for the capture. Default: auto — kiyas detects the design's brightness and retries in the matching scheme.
componentstringNatural-language description of the component to find in the codebase, e.g. "primary button on the login page".
designImagestringLocal path, http(s) URL, or base64 data: URI of a design image (e.g. a screenshot) to compare against, instead of a Figma URL. Useful when no Figma token is configured — e.g. export the frame with a…
devServerstringDev server base URL (default: auto-detect a listening server on ports 3000/5173/8080/4200, else http://localhost:3000)
figmastringFigma frame/component URL. Provide either `figma` OR `designImage`.
fullPagebooleanCapture the full scrollable page when no selector is given (default: true)
modelstringAI provider (default: claude)
namestringFriendly name for the comparison, used in the report header
runsintegerRun the comparison N times and keep majority-vote findings — higher consistency at N× cost (default: 1)
scalenumberRender scale applied to both the Figma export and the screenshot (default: adaptive — 2 for component-sized captures, 1 for large ones)
selectorstringCSS selector to screenshot a specific element
targetstringDirect URL of the rendered component. Provide either `target` OR `component`.
thresholdstringSeverity threshold for the rendered HTML report (default: all)
viewportstringViewport for the screenshot, format WIDTHxHEIGHT (default: 1280x720)
waitintegerTime in ms to wait after page load before screenshotting

get_diff_report

Fetch a stored kiyas report by reportId. Defaults to JSON; pass format=html to fetch the rendered report. Returns the artifact path and (by default for JSON) inline content.

ParameterTypeDescription
reportId *stringReport ID returned from a prior compare call
formatstringWhich artifact to return (default: json)
includeContentbooleanWhen true, return the raw file content inline. When false, return only the path. Default: true for json, false for html (HTML is large).

list_issues

List discrepancies from a stored kiyas report by reportId, optionally filtered by severity (all | high | medium | low).

ParameterTypeDescription
reportId *stringReport ID returned from a prior compare call
severitystringFilter to a single severity level (default: all)