Skip to main content
Glama

ui_builder_check_design

Check a design before you show it to anybody — one call instead of validate, view and an accessibility pass. Runs schema (document shape), catalog (the pinned catalog's validation, the mutation reducer and the Compose export gate — what ui_builder_validate runs) and a11y: controls with no label, icons and pictures with no contentDescription, touch targets under 48dp, text and icon contrast under WCAG 4.5:1 / 3:1, and text in a fixed height that clips at 200% font scale. Check a stored design (designId, optionally a past revision), a whole document, or operations applied to a scratch copy of designId exactly as ui_builder_apply would — nothing is saved. Returns summary first, then ok, the counts, and findings with the nodeId each is about, so you can fix them with ui_builder_apply and check again. rendered: true measures touch targets on a native render where the host has one (needs the ui-builder-export capability). Contrast against theme roles is resolved with the Material 3 baseline scheme, in both the light and the dark theme when a colour follows the theme (the finding names the theme that fails), and reported as a warning, never an error. guidelines runs only when named: a model judges the design against the Android design guides (developer.android.com) for its platform and reports each broken rule as a warning or note with its source. It uses this host's shared model key, so it runs only for the accounts the operator enabled and is reported as skipped for everyone else; with rendered: true the visual rules are judged on the native render too.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenNoA grant token from poll_access, when you cannot set the X-Compose-Preview-Token header yourself — an MCP client fixes its headers at connect time, so this is how a token approved during this session is used in it. Prefer the header where you control it.
checksNoWhich checks to run. Defaults to schema, catalog, a11y; `guidelines` runs only when named.
designIdNoA stored design to check, or to check `operations` against.
documentNoA whole DesignDocumentV1 to check instead of a stored design.
renderedNoMeasure touch targets on a native render, and show it to the guidelines model. Exported Kotlin that fails to compile there is an error finding (check `native`). Defaults to false.
revisionNoA past revision of `designId`. Omit for the current one.
agentNameNoOptional agent/client name shown to design viewers; self-reported.
agentModelNoOptional current model name shown to design viewers; self-reported. Omit when unknown.
operationsNoDesignMutationV1 objects to apply to a scratch copy of `designId` and check — a dry run.
baseRevisionNoThe revision `operations` were written against; a stale one is a warning.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
checksYes
dryRunNo
errorsYes
schemaYes
skippedNo
summaryYes
designIdNo
findingsYes
revisionNo
warningsYes
truncatedNo
guidelinesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / rendered / description
      Previous value: -"Measure touch targets on a native render, and show it to the guidelines model. Defaults to false."New value: +"Measure touch targets on a native render, and show it to the guidelines model. Exported Kotlin that fails to compile there is an error finding (check `native`). Defaults to false."
  2. Changed1 schema field changed
    • changedOutput schema / properties / findings / items / properties / measured / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "height": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "ratio": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "required": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "unit": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "width": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "height": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "ratio": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "required": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "theme": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "unit": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "width": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed1 schema field changed
    • changedOutput schema / properties / guidelines / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "asked": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "designId": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "model": {
      -        "type": "string"
      -      },
      -      "ranBy": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "recordedAtEpochMillis": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "revision": {
      -        "type": "integer"
      -      },
      -      "rulesVersion": {
      -        "type": "integer"
      -      },
      -      "schema": {
      -        "type": "string"
      -      },
      -      "verdicts": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "confidence": {
      -              "type": "number"
      -            },
      -            "nodeIds": {
      -              "items": {
      -                "type": "string"
      -              },
      -              "type": "array"
      -            },
      -            "reason": {
      -              "type": "string"
      -            },
      -            "ruleId": {
      -              "type": "string"
      -            },
      -            "verdict": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "ruleId",
      -            "verdict"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "revision",
      -      "model",
      -      "rulesVersion",
      -      "asked",
      -      "verdicts"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "asked": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "costUsd": {
      +        "anyOf": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "designId": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "generationId": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "model": {
      +        "type": "string"
      +      },
      +      "provider": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "ranBy": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "recordedAtEpochMillis": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "revision": {
      +        "type": "integer"
      +      },
      +      "routing": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "probability": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "reason": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "router": {
      +                "type": "string"
      +              },
      +              "scores": {
      +                "additionalProperties": {
      +                  "type": "number"
      +                },
      +                "type": "object"
      +              },
      +              "version": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              }
      +            },
      +            "required": [
      +              "router"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "rulesVersion": {
      +        "type": "integer"
      +      },
      +      "schema": {
      +        "type": "string"
      +      },
      +      "servedModel": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "verdicts": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "confidence": {
      +              "type": "number"
      +            },
      +            "nodeIds": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "reason": {
      +              "type": "string"
      +            },
      +            "ruleId": {
      +              "type": "string"
      +            },
      +            "verdict": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "ruleId",
      +            "verdict"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "revision",
      +      "model",
      +      "rulesVersion",
      +      "asked",
      +      "verdicts"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. Changed1 schema field changed
    • addedOutput schema / properties / guidelines
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "asked": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "designId": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "model": {
      +          "type": "string"
      +        },
      +        "ranBy": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "recordedAtEpochMillis": {
      +          "anyOf": [
      +            {
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "revision": {
      +          "type": "integer"
      +        },
      +        "rulesVersion": {
      +          "type": "integer"
      +        },
      +        "schema": {
      +          "type": "string"
      +        },
      +        "verdicts": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "confidence": {
      +                "type": "number"
      +              },
      +              "nodeIds": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "reason": {
      +                "type": "string"
      +              },
      +              "ruleId": {
      +                "type": "string"
      +              },
      +              "verdict": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "ruleId",
      +              "verdict"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "revision",
      +        "model",
      +        "rulesVersion",
      +        "asked",
      +        "verdicts"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  5. Changed3 schema fields changed
    • changedInput schema / properties / checks / description
      Previous value: -"Which checks to run. Defaults to all three."New value: +"Which checks to run. Defaults to schema, catalog, a11y; `guidelines` runs only when named."
    • changedInput schema / properties / checks / items / enum
      Previous value: -[
      -  "schema",
      -  "catalog",
      -  "a11y"
      -]New value: +[
      +  "schema",
      +  "catalog",
      +  "a11y",
      +  "guidelines"
      +]
    • changedInput schema / properties / rendered / description
      Previous value: -"Measure touch targets on a native render. Defaults to false."New value: +"Measure touch targets on a native render, and show it to the guidelines model. Defaults to false."
  6. Changed2 schema fields changed
    • addedInput schema / properties / agentModel
      Added value: +{
      +  "description": "Optional current model name shown to design viewers; self-reported. Omit when unknown.",
      +  "maxLength": 80,
      +  "type": "string"
      +}
    • addedInput schema / properties / agentName
      Added value: +{
      +  "description": "Optional agent/client name shown to design viewers; self-reported.",
      +  "maxLength": 80,
      +  "type": "string"
      +}
  7. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations the description carries the full burden and does so: it discloses that nothing is saved, that rendered:true needs the ui-builder-export capability and surfaces Kotlin compile failures as error findings, that contrast issues are warnings never errors, and that guidelines depends on the host's shared model key and is skipped for non-enabled accounts.

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 the single most important fact (check before showing) and every clause carries information about checks, capabilities, or defaults. It is dense as one long paragraph and could be split for scannability, but there is little filler given the four checks and ten parameters.

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?

For a 10-parameter tool with nested objects and an output schema, it covers the remaining gaps: auth via the token/header note, capability requirements, the guidelines account gating, and the shape/order of results (summary first, then ok, counts, findings). Nothing an agent needs to invoke it correctly is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: guidelines runs only when named, operations execute against a scratch copy 'exactly as ui_builder_apply would', baseRevision staleness is a warning, and rendered measures touch targets on a native render.

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?

States a concrete composite action and enumerates exactly what it bundles (schema document shape, catalog validation, a11y checks), and explicitly positions it against siblings: 'one call instead of validate, view and an accessibility pass.' An agent can distinguish it from ui_builder_validate and ui_builder_view without opening any schema.

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?

Gives a clear trigger ('Check a design before you show it to anybody') and names the alternatives it replaces, plus the dry-run semantics for operations. It stops short of stating when a narrower single check (e.g. ui_builder_validate) would be preferable, so there is no explicit when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.