Skip to main content
Glama

Validate UI

validate_ui
Read-onlyIdempotent

Validate React components against active preset rules to check design conformance, returning a score and detailed issues without modifying code.

Instructions

Validate a React component against the active preset rules without modifying code. Returns a conformance score (0–100) and detailed issue list.

Args:

  • code (string): React component source code

  • include_suggestions (boolean): Include info-level suggestions (default: true)

Returns:

  • valid (boolean): No errors found

  • score (number): 0–100 conformance score

  • issues: Array of { severity, rule, message, fix } objects

  • presetUsed: Which preset was applied

Requires active preset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesReact component source code to validate
include_suggestionsNoInclude info-level suggestions
Behavior4/5

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

Annotations already indicate read-only, non-destructive, and idempotent behavior, which the description reinforces with 'without modifying code.' The description adds valuable context beyond annotations: it specifies the return format (score, issues, presetUsed) and the prerequisite of an active preset, which are not covered by annotations.

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?

The description is well-structured and front-loaded with the core purpose, followed by details. It uses bullet points for clarity, but the 'Args' and 'Returns' sections slightly repeat schema information, making it slightly verbose. Overall, it remains efficient and easy to scan.

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

Completeness5/5

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

Given the tool's complexity (validation with scoring), rich annotations (read-only, idempotent), and no output schema, the description is complete: it explains the purpose, parameters, return values, and prerequisites. It adequately compensates for the lack of output schema by detailing the return structure.

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 description coverage is 100%, so the schema fully documents both parameters. The description adds minimal semantics beyond the schema, only restating parameter purposes in the 'Args' section without additional context like validation rules or examples. Baseline 3 is appropriate given high schema coverage.

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 specific action ('validate a React component against the active preset rules') and resource ('React component'), distinguishing it from siblings like 'autocorrect_component' (which modifies code) or 'list_presets' (which lists presets). It explicitly notes 'without modifying code' to differentiate from mutation tools.

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 provides clear context for when to use it ('validate a React component against the active preset rules') and includes a prerequisite ('Requires active preset'), but does not explicitly state when not to use it or name alternatives among siblings (e.g., 'autocorrect_component' for fixing issues).

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/ncsound919/OG-Glass'

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