get_css_styles
Retrieves matched CSS rules, inline, inherited, and custom-property styles for an element by UID, ordered by cascade precedence and flagged as active or overridden.
Instructions
Retrieve matched CSS rules, inline styles (element.style), inherited styles, custom properties, and cascade wrappers (@layer, @media, @container, @scope) for an element identified by its UID. Rules are ordered from highest to lowest cascade precedence and include source line numbers (e.g. index:196). Active (winning) declarations have no prefix tag, while (losing) overridden declarations are prefixed with [overloaded]. Treat the output as authoritative and complete. Results are paginated (10 rules per page by default); use pageIdx to page through the remaining rules. Requires a UID from take_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": {
"pageId": "<pageId>",
"uid": "<uid>"
},
"name": "get_css_styles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | The uid of the element on the page from the page content snapshot to inspect CSS styles for | |
| pageId | Yes | Targets a specific page by ID. | |
| pageIdx | No | Page number to return (0-based). Defaults to 0 (the first page). | |
| pageSize | No | Maximum number of CSS rules to return per page. Defaults to 10. |