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. hostLogic checks a design's host logic would run (it loads, exports init and onAction, and init answers what the design can hold); a design without host logic passes it for free. 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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ui_builder_check_design"
  }
}

Input 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, hostLogic; `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

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / checks / description
      Previous value: -"Which checks to run. Defaults to schema, catalog, a11y; `guidelines` runs only when named."New value: +"Which checks to run. Defaults to schema, catalog, a11y, hostLogic; `guidelines` runs only when named."
    • changedInput schema / properties / checks / items / enum
      Previous value: -[
      -  "schema",
      -  "catalog",
      -  "a11y",
      -  "guidelines"
      -]New value: +[
      +  "schema",
      +  "catalog",
      +  "a11y",
      +  "hostLogic",
      +  "guidelines"
      +]
  2. 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."
  3. 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"
      +  }
      +]
  4. 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"
      +  }
      +]
  5. 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"
      +    }
      +  ]
      +}
  6. 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."
  7. 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"
      +}
  8. Added

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and largely meets it: it discloses that nothing is persisted, that `rendered` needs the ui-builder-export capability, that contrast failings are warnings never errors, that guidelines run only for operator-enabled accounts via a shared model key and are reported as skipped otherwise, and that a stale `baseRevision` is a warning. The remaining gap is a precise statement of what error conditions the call itself can return versus what lands in `findings`.

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 first sentence is a strong, front-loaded hook and every subsequent passage carries real information. It is nevertheless a dense block of em-dash-chained clauses, and the long `catalog` parenthetical plus the trailing guidelines sentence could be split for faster scanning without losing content.

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, the description covers the decision-relevant surface: what each check inspects, what is and is not persisted, capability requirements, and how `findings` pair with `nodeId` so results feed back into ui_builder_apply. Return-shape detail is correctly deferred to the output schema.

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 schema already defines each parameter; the description still adds cross-parameter meaning the schema cannot, notably that `operations` are applied to a scratch copy of `designId` "exactly as ui_builder_apply would" and that `revision` selects a past stored revision. The `rendered` and `guidelines` interactions with capabilities and account eligibility are genuinely value-adding context not captured per-parameter in the schema.

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 specific verb and resource ("Check a design") and immediately decomposes it into the exact three checks it bundles: `schema`, `catalog` and `a11y`. It also anchors itself against a sibling by saying the catalog stage is "what ui_builder_validate runs," so an agent can separate the two without opening either schema.

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

Usage Guidelines5/5

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

Explicitly frames the moment of use ("before you show it to anybody — one call instead of validate, view and an accessibility pass") and names the alternatives it replaces. It further scopes behavior: `guidelines` runs only when named, and the tool works on a stored `designId`, a whole `document`, or `operations` as a dry run with nothing saved.

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.