Skip to main content
Glama

get_css_styles

Read-only

Retrieve matched CSS rules, inline and inherited styles, and cascade data for an element UID to debug why properties are applied, overridden, or conflicting.

Instructions

Retrieve matched CSS rules, inline styles, inherited styles, and cascade information for an element identified by its UID. Use this tool to debug why specific CSS properties are applied, overridden, or conflicting. Results are paginated and return 10 rules per page by default; use pageIdx to page through the remaining rules. Requires a UID from take_snapshot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYesThe uid of the element on the page from the page content snapshot to inspect CSS styles for
pageIdYesTargets a specific page by ID.
pageIdxNoPage number to return (0-based). Defaults to 0 (the first page).
pageSizeNoMaximum number of CSS rules to return per page. Defaults to 10.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered, and the description adds genuinely useful behavior: results are paginated at 10 rules per page and pageIdx advances through them, plus a hard dependency on take_snapshot for the UID. It stops short of describing ordering or error behavior.

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?

Three sentences, purpose front-loaded, then usage, then pagination logistics. Every sentence carries information, though the pagination sentence could be marginally tighter.

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?

With no output schema, the description does the work of naming the return content (matched, inline, inherited rules and cascade info) and pagination behavior, which is what an agent needs to call and interpret it. Missing only edge-case/error behavior.

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 coverage is 100%, so the schema already documents uid, pageId, pageIdx, and pageSize. The description's mention of pagination and default page size largely restates schema defaults, adding only the practical hint to advance with pageIdx, which is the baseline 3 expectation when the schema does the heavy lifting.

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?

States a specific verb (Retrieve) and a well-scoped resource (matched CSS rules, inline, inherited styles, cascade info for an element), and it is clearly distinguishable from sibling tools like take_snapshot or evaluate_script. An agent can tell what this returns without opening the schema.

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?

Explicitly frames the use case (debug why CSS properties are applied, overridden, or conflicting) and states the prerequisite (a UID from take_snapshot). It does not name an alternative tool or state when not to use it, so it falls short of a 5.

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