Decode any live site into design tokens
decode_urlFetch a public site's HTML and stylesheets and return what its CSS declares: named custom properties that look like design tokens, the colours it uses most, its font stacks, border radii, spacing values, and the framework it appears to be built with. Also returns a "drop" report: roughly how many words a web-to-markdown reader would carry away from this page, against the design decisions it would discard, because markdown is defined by throwing the design layer away. It reads CSS and does not render the page, so it reports a confidence ("tokens" when named properties were found, "derived" when only compiled CSS was available) and flags a JavaScript shell rather than pretending every site is equally legible. It obeys the site's robots.txt for CSSCremeBot: a disallowed path is refused with ROBOTS_DENIED, which a retry will not change. A bot challenge, a parked or for-sale domain, or a host's default page is refused with NOT_THE_SITE and the evidence, rather than measured as if it were the site. Every error starts with its code and a retry verdict (never, later, with-changes). A read is reused for up to maxAge seconds (default 600, 0 for fresh), and every result carries work: the requests it made of the site. Use when the user wants to match a site that is not in the catalogue, or has fetched a page as markdown and needs what that markdown lost.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute public http(s) URL of the page to read. | |
| expect | No | Optional brand hex, like #635BFF. The json response then carries `expect`: the nearest value the site declares (a token when it has any, else a literal), its CIE76 distance, and whether that is within the same-colour tolerance, near, or different. A distance, not a grade. | |
| format | No | Default json (the measurement). Or one artefact from the same read: md (DESIGN.md), tokens (W3C DTCG tokens.json with the site's declared names by scope), css (globals.css: shadcn variables, Tailwind v4 @theme, the declared block), tailwind (v4 and v3 shapes), registry (a shadcn registry item: npx shadcn add <url>), agents (an agents.md rules block), aliases (every resolved value mapped back to the declared names that produce it, with scope), figma (a script for Figma's use_figma tool that creates a Variables collection with Light and Dark modes, built from the same mapper the CSS Crème plugin runs). | |
| maxAge | No | How old a reused read may be, in seconds. Default 600; 0 reads the site now. A reused read keeps its own fetchedAt and says cache.hit: true. | |
| expectSpec | No | Optional brand spec to check field by field, for example {"primary":"#635BFF","bg":"#FFFFFF","font":"Inter","heading":"Sohne","radius":"8px","base":"16px","spacing":"4px","darkMode":true,"tokens":{"--brand":"#635BFF"}}. The json response then carries `compliance`: per field a verdict (match, near, different, not-declared), what it was compared against, and the value found. not-declared means the site gives nothing to compare; it is never filled with the nearest guess. |