Skip to main content
Glama

browser_css_styles

Inspect computed and inline CSS styles plus matched cascade rules for an element ref to diagnose styling and rendering issues.

Instructions

Inspect computed CSS styles, inline styles, and matched CSS cascade rules for an element ref from browser_snapshot.

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": {
      "ref": "<ref>"
    },
    "name": "browser_css_styles"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesElement ref from browser_snapshot (e.g. 'e3').
elementNoHuman-readable description of the target element.
maxRulesNoMaximum number of matched CSS rules to return (default: 25).
sessionIdNoOptional target browser session ID. If omitted, uses the currently active session (or auto-launches one).
computedPropertiesNoAdditional kebab-case CSS property names to include in computed styles.
includeMatchedRulesNoInclude matched CSS selector rules from stylesheets via CDP (default: true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; 'Inspect' implies a read-only operation and the sentence enumerates what data is surfaced (computed, inline, matched rules via stylesheets), which is useful. It does not state that the call is non-destructive, whether it requires an active session, or any cost/latency characteristics of the CDP rule collection.

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

Conciseness4/5

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

A single dense sentence with no filler, front-loaded on the verb and the data returned. It is compact enough that the dependency on browser_snapshot is somewhat buried at the end rather than stated as a precondition.

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?

No output schema exists, so the description usefully enumerates the three categories of style data returned, which is the most important missing piece. For a read-only inspection tool of moderate complexity, that covers the essentials, though it is silent on session behavior and on failure modes such as stale or invalid refs.

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 100%, so all six parameters (ref, element, maxRules, sessionId, computedProperties, includeMatchedRules) are already documented in the schema. The description adds no meaning beyond that, such as how computedProperties interacts with the default computed set or what includeMatchedRules=false suppresses.

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

Purpose4/5

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

Uses a specific verb (Inspect) with three named resources (computed styles, inline styles, matched cascade rules) and ties the input to an element ref produced by browser_snapshot. It is easy to distinguish from siblings like browser_evaluate or browser_take_screenshot, though it does not explicitly name an alternative.

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

Usage Guidelines3/5

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

Usage is only implied: the mention of 'an element ref from browser_snapshot' tells the agent a snapshot must be taken first, which is real ordering guidance. There is no explicit when-to-use vs when-not guidance and no pointer to browser_evaluate for values this tool cannot read.

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