Skip to main content
Glama

css.computed

Read-only

Retrieve computed CSS styles for a page element to inspect its applied property values. Defaults to key properties; pass all:true to return every computed style.

Instructions

Computed style of an element. Defaults to the properties that usually matter; pass all:true for everything.

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": "css.computed"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNo
nthNoZero-based index when the locator matches several elements.
refNoSnapshot ref (eNN) from page.snapshot.
textNoVisible text of the element.
xpathNoXPath expression.
frame_idNoFrame to search within; see page.list_frames.
selectorNoCSS selector; pierces shadow DOM.
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
propertiesNo
backend_node_idNoCDP backendNodeId, e.g. from inspector.pick.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds genuinely useful behavior: by default only a curated subset of properties is returned, and all:true expands the result. It says nothing about what happens when the locator matches multiple elements or fails to resolve, which matters for an 11-parameter locator tool.

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?

Two short sentences, front-loaded with the purpose and followed by the one behavioral switch that matters. The phrase 'properties that usually matter' is slightly vague about which properties are included, but nothing is wasted.

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

Completeness3/5

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

For a tool with 11 optional locator parameters and no output schema, the description covers the return-shape question adequately but leaves element-resolution behavior (multiple matches, nth, missing element) unaddressed. The schema carries most of the parameter burden, so this is adequate rather than complete.

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

Parameters4/5

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

Schema coverage is 82%, so the baseline is 3, but the description goes beyond the schema by explaining the otherwise undocumented 'all' flag and implying that the default property set is a curated subset. It does not clarify the 'properties' array, which is also undocumented in the schema, so it falls short of full compensation.

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?

The description names a specific resource and operation: the computed style of an element. It is clear what the tool returns, but it never distinguishes itself from nearby siblings such as css.matched_rules or css.get_stylesheet_text, so an agent must infer the difference from the names alone.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no mention of alternatives. The only conditional statement ('pass all:true for everything') is parameter guidance rather than a rule for choosing this tool over css.matched_rules or css.explain_visibility.

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

Deploy Server

Other Tools