Analyze HTML and CSS
analyze_htmlUse this when you need to inspect generated, offline, or test HTML that you already have. Avoid it when the source is a live URL; use analyze_site, inspect_component, or create_replication_kit.
Instructions
Use this when you need to inspect generated, offline, or test HTML that you already have. Avoid it when the source is a live URL; use analyze_site, inspect_component, or create_replication_kit. Render supplied markup and extract the same design-system data as a remote page analysis. Cost: standard. Session: renders supplied markup without navigating to a remote URL. Does not write files.
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": "analyze_html"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | Optional CSS to inject into the document. | |
| html | Yes | HTML document or fragment to render. | |
| baseUrl | No | Optional base URL used to resolve relative assets. | |
| timeoutMs | No | ||
| maxElements | No | Maximum DOM elements to analyze. | |
| includeHidden | No | Include elements hidden by CSS or layout. | |
| viewportWidth | No | Browser viewport width in CSS pixels. | |
| viewportHeight | No | Browser viewport height in CSS pixels. | |
| maxComponentExamples | No | Example selectors returned for each component type. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | ||
| guidance | Yes |