Skip to main content
Glama

validate_component_code

Validates agent-generated web component code using 19 anti-hallucination sub-validators for HTML attributes, accessibility, CSS, and more. Returns anti-pattern examples and fix suggestions to ensure code quality before submission.

Instructions

ALL-IN-ONE validator — runs 19 anti-hallucination sub-validators on agent-generated code in a single call. Validates HTML attributes, slot children, attribute conflicts, a11y patterns, Shadow DOM CSS, custom properties, token fallbacks, theme compatibility, CSS specificity, layout patterns, inline styles, event bindings, method calls, composition patterns, component imports, color contrast, CSS scope, shorthand safety, and transition/animation patterns. Returns antiPatterns (component-specific negative examples) and auto-generated fix suggestions on issues. Use this as the FINAL check before submitting any code that uses web components.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
libraryIdNoOptional library ID to target a specific loaded library instead of the default.
htmlYesThe HTML markup to validate.
cssNoOptional CSS code to validate for Shadow DOM and custom property issues.
codeNoOptional JS/JSX/template code to validate event bindings.
tagNameYesThe primary custom element tag name to validate against.
frameworkNoOptional framework hint for event validation.

Tool Definition Quality

Score is being calculated. Check back soon.

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