Skip to main content
Glama

validate_composition

Read-onlyIdempotent

Statically check HTML or Astro source for Basecoat migration errors, semantic rhythm, FSM bindings, missing scripts, nested cards, spacing, and hierarchy issues before fixing diagnostics.

Instructions

[STAGE 4: QUALITY AUDIT] Statically check HTML/Astro source for Basecoat migration errors, semantic rhythm, FSM bindings, missing scripts, nested cards, spacing and hierarchy issues. Pass code or alias html and optionally a semanticProfile and densityProfile. Does not render or evaluate dynamic code. Next step: Fix any errors/warnings reported in the diagnostic output.

Input Schema

NameRequiredDescriptionDefault
codeNoHTML or Astro source code to validate statically against Basecoat rules and tokens.
htmlNoAlias for code parameter. Pass either code or html.
densityProfileNoOptical spacing density profile ("comfortable" or "compact").
semanticProfileNoSemantic rhythm profile ID (e.g., "default", "dashboard"). Defaults to "default".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.8.0
    • addedInput schema / properties / code / description
      Added value: +"HTML or Astro source code to validate statically against Basecoat rules and tokens."
    • addedInput schema / properties / densityProfile / description
      Added value: +"Optical spacing density profile (\"comfortable\" or \"compact\")."
    • addedInput schema / properties / html / description
      Added value: +"Alias for code parameter. Pass either code or html."
    • addedInput schema / properties / semanticProfile / description
      Added value: +"Semantic rhythm profile ID (e.g., \"default\", \"dashboard\"). Defaults to \"default\"."
  2. Changed4 schema fields changedv1.4.0
    • changedInput schema / properties / code / maxLength
      Previous value: -65536New value: +262144
    • addedInput schema / properties / densityProfile
      Added value: +{
      +  "enum": [
      +    "comfortable",
      +    "compact"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / html / maxLength
      Previous value: -65536New value: +262144
    • addedInput schema / properties / semanticProfile
      Added value: +{
      +  "maxLength": 64,
      +  "type": "string"
      +}
  3. Changed2 schema fields changedv1.0.3
    • addedInput schema / properties / html
      Added value: +{
      +  "maxLength": 65536,
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "code"
      -]
  4. First observedv1.0.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds real behavioral context beyond that: it enumerates what is checked and explicitly states it 'Does not render or evaluate dynamic code,' which is a meaningful scope limit an agent would not otherwise know.

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?

Front-loaded with a bracketed stage tag, then the action, then parameter hints, then constraints and the next step. Dense but each sentence carries information; no padding. Slightly list-heavy, which shaves a point.

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

Completeness4/5

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

A read-only validation tool with 100% schema coverage and annotations covering the safety profile; the description supplies the check list, the dynamic-code exclusion, and the follow-up step. Only gap is that no output schema exists, and the description references a 'diagnostic output' whose shape is not characterized, but that is minor.

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 already documents code, html (as the alias), semanticProfile, and densityProfile with an enum. The description restates the code/html alias and optionality but adds no format or default detail beyond what the schema provides, so baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource: statically check HTML/Astro source for a concrete list of Basecoat issues (migration errors, semantic rhythm, FSM bindings, nested cards, spacing). The scope is precise. However, it never distinguishes itself from the very similar siblings validate_markup, validate_design, and inspect_quality, so an agent cannot tell them apart from the description alone.

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

Usage Guidelines3/5

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

The '[STAGE 4: QUALITY AUDIT]' label and 'Next step: Fix any errors/warnings' sentence give useful workflow/workflow-position context (audit stage, then fix). But there is no explicit when-to-use vs alternatives guidance and no mention of the sibling validators, so selection between this and validate_markup/validate_design is left to inference.

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