Skip to main content
Glama

enforce_rules

Read-onlyIdempotent

Audit HTML or framework markup against indexed Basecoat UI technical constraints and retrieve matching rules by ID, category, environment, or query.

Instructions

[STAGE 2: RULES & RHYTHM] Alias of basecoat_rules_enforcer. Retrieve indexed technical implementation constraints.

Input Schema

NameRequiredDescriptionDefault
idNoRule ID or component ID to inspect.
codeNoHTML/markup snippet to audit against the indexed technical constraints.
htmlNoAlternative alias for the code parameter to audit against constraints.
nameNoRule or component name alias.
queryNoSearch query to match against rule IDs, titles, forbidden patterns, or required syntax.
categoryNoFilter rules by technical domain: "tailwind-v4", "fsm-contracts", "tokens", "semantic-html", "dashboard-patterns", or "all".
componentIdNoComponent ID alias to filter relevant rules.
environmentNoTarget output environment: "html", "astro", "react", "vue", or "svelte". Defaults to "html".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.0

TDQS

C2.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false, destructiveHint=false, so the safety profile is covered. The description adds 'indexed' (implying a pre-built corpus) but does not disclose return behavior, whether it audits the passed code or just returns rules, or how aliases interplay.

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?

A single short sentence with a stage prefix — no waste. It is front-loaded, though the stage tag is metadata rather than useful description.

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

Completeness2/5

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

For an 8-parameter tool with no output schema, the description does not explain what is returned, how the code/html audit mode works versus query mode, or how strictness is applied. The annotations cover safety but the description is too thin to guide correct invocation.

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 every parameter is documented in the schema itself. The description adds no syntax, format, or precedence detail (e.g., which of id/name/componentId/query win when combined). Baseline 3 when the schema does the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a verb+resource ('retrieve indexed technical implementation constraints'), but the framing as an 'alias of basecoat_rules_enforcer' plus a stage tag does most of the disambiguating work. It doesn't say what these constraints look like or how it differs from sibling get_design_rules/get_rhythm_rules beyond the parent tool name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no when-not-to-use, and no mention of alternatives like get_design_rules or get_rhythm_rules. The '[STAGE 2: RULES & RHYTHM]' tag implies it belongs in a pipeline stage but doesn't explain call conditions or prerequisites.

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