Skip to main content
Glama

check_shadow_dom_usage

Scan CSS code for Shadow DOM anti-patterns including descendant selectors piercing boundaries, ::slotted() misuse, invalid ::part() chaining, !important on tokens, unknown part names, and typo detection to catch mistakes before production.

Instructions

Scans consumer CSS code for Shadow DOM anti-patterns — descendant selectors piercing shadow boundaries, ::slotted() misuse, invalid ::part() chaining, !important on tokens, unknown part names, and typo detection. Run this on any CSS targeting web components to catch mistakes before they reach production.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
libraryIdNoOptional library ID to target a specific loaded library instead of the default.
cssTextYesThe CSS code to scan for Shadow DOM anti-patterns.
tagNameNoOptional tag name to scope checks. When provided, enables CEM-based validation (unknown parts, typo detection).
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the types of anti-patterns checked and notes that tagName enables CEM-based validation. However, it does not describe the output format or any side effects, which is a minor gap.

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: the first focuses on the tool's function and lists specific anti-patterns, the second provides usage guidance. No redundant words, and it is front-loaded with key details.

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?

Given the lack of output schema, the description should explain what the tool returns (e.g., a report of issues, pass/fail, etc.). It lists what is checked but not the output format, which is needed for an agent to interpret results. This is a moderate gap.

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?

All three parameters are described in the schema with 100% coverage. The description adds meaning by explaining that tagName enables CEM-based validation (unknown parts, typo detection) and libraryId targets a specific library. This adds value beyond the 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 scans consumer CSS code for Shadow DOM anti-patterns, listing specific issues like descendant selectors, ::slotted() misuse, etc. It distinguishes from siblings like check_shadow_dom_js by focusing on CSS side.

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 says 'Run this on any CSS targeting web components to catch mistakes before they reach production,' providing clear usage context. It does not explicitly mention when not to use or compare to alternatives, but the context is strong.

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/bookedsolidtech/helixir'

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