Skip to main content
Glama

Analyze HTML and CSS

analyze_html
Read-onlyIdempotent

Render supplied HTML with optional CSS in Chromium. Extract design tokens, assets, and layout data from generated markup, offline pages, and tests.

Instructions

Render supplied HTML and optional CSS in Chromium, then extract the same design system data as analyze_site. Useful for generated markup, offline pages, and tests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cssNoOptional CSS to inject into the document.
htmlYesHTML document or fragment to render.
baseUrlNoOptional base URL used to resolve relative assets.
timeoutMsNo
maxElementsNoMaximum DOM elements to analyze.
includeHiddenNoInclude elements hidden by CSS or layout.
viewportWidthNoBrowser viewport width in CSS pixels.
viewportHeightNoBrowser viewport height in CSS pixels.
maxComponentExamplesNoExample selectors returned for each component type.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds that it renders in Chromium (a headless browser) and extracts the same data as analyze_site, but does not disclose details about execution such as JavaScript handling, network requests, or result structure beyond the output schema. This adds some context but not rich behavioral detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long and front-loaded with the core operation ('Render supplied HTML and optional CSS in Chromium, then extract...'). The second sentence adds targeted use cases. Every word contributes value, with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema and annotations, the description provides sufficient context for an agent to select and invoke the tool. It clarifies the input mode, scope, and typical scenarios. The only minor gap is that 'design system data' is not explicitly defined, but referencing analyze_site provides the needed referent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 89%, so the baseline is 3. The description does not introduce parameter-specific information beyond the schema; it only mentions 'optional CSS' and 'supplied HTML,' which mirror the html and css parameters. No additional semantic value is provided over the well-documented schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool renders supplied HTML and optional CSS in Chromium and extracts the same design system data as analyze_site. It distinguishes itself from the sibling analyze_site by input type (supplied markup vs. live site) and names specific use cases: generated markup, offline pages, and tests.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool—'for generated markup, offline pages, and tests'—and implies that analyze_site is the alternative for live sites via 'same design system data as analyze_site.' It does not explicitly state exclusions or enumerate alternatives, but the intended usage context is evident.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/blackridder22/PicassoWeb'

If you have feedback or need assistance with the MCP directory API, please join our Discord server