What width the code DECLARES, not what it measured
qa_width_lawReads the width ceilings declared in your layout code, names the element setting the tightest one, and optionally compares them against a mockup width to show where the content band diverges.
Instructions
THE LAW, NOT THE READING. «The container is 1360 wide» is a fact about the window it was measured in, true here and false one drag of the mouse later — which is why comparing a layout to a mockup by measuring has never worked. This reads what the CODE DECLARED instead: how many width ceilings exist on the layout spine, which element sets the tightest one, and what content band follows from that at any window. A declaration does not move when the window does, so it can be compared with a mockup and argued about. Pass figmaWidth (one number off the design, e.g. 1400) and it prints the two declarations side by side plus what follows — «the mockup declares one ceiling at 1400; the code declares none at all; at 1920 the band is 1840, which is 440 wider». It NEVER says which of the two is right: that is the human's call, and an instrument that guesses it is one nobody trusts twice. VALUES THAT MOVE WITH THE WINDOW ARE REFUSED ON PURPOSE. clamp(), vw and percentages declare no single law, so they go to a notMeasured list with the reason instead of being resolved at the current window and printed as if they were fixed — that number would be right on this screen and wrong on the next, and indistinguishable from a real finding. Narrow boxes (a sidebar, a card) are not judged either: they are narrow by design. Read-only and free. Read notMeasured FIRST — a clean page and an unexamined one look identical without it.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "qa_width_law"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | Target tab (from qa_tabs); omit for the active tab | |
| within | No | Scope to this container (a CSS selector). Omit for the whole page, which is usually what you want — the spine starts at <body>. | |
| figmaWidth | No | The mockup's own declared content width, one number. With it you get the comparison; without it you still get what the code declares. |