Skip to main content
Glama

Assert page state

ui_assert
Read-onlyIdempotent

Assert UI conditions on a live page with text-only checks for text, visibility, counts, console errors, overflow, and accessibility, returning pass/fail with evidence.

Instructions

Run cheap text-only checks against a live page: text present, element visible/hidden, element count, no console errors, no horizontal overflow, no a11y violations. Returns pass/fail with short evidence. Never returns images.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
checksYes
waitForNoCSS selector to wait for, or ms to wait
darkModeNo
viewportNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), and the description adds a genuine behavioral contract: it returns pass/fail with short evidence and never returns images. It stops short of describing timing behavior (waitFor), timeouts, or what happens on partial failure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tightly packed sentences, front-loaded with the capability list and closed with the distinguishing return constraint. No filler, no repetition of the title.

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

Completeness3/5

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

With 5 parameters, nested check objects, and no output schema, the description adequately covers purpose and return shape but leaves the caller without guidance on timing (waitFor), viewport/darkMode, or how min/max/impact interact with the check types. Enough to call it, not enough to call it well.

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 only 20%, so the description should compensate. It partially does by enumerating the check kinds ('text present, element visible/hidden, element count, no console errors, no horizontal overflow, no a11y violations'), which map to the checks[].type enum, but it says nothing about waitFor, darkMode, viewport, or the min/max/impact/selector fields.

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 (assert/check) and resource (live page) and enumerates the exact check categories: text, visibility, count, console errors, overflow, a11y. The clause 'Never returns images' implicitly separates it from ui_capture, so an agent can route between 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 Guidelines3/5

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

The word 'cheap text-only' implies this is the lightweight alternative to screenshot-based siblings like ui_capture, but no sibling is named and there is no explicit when-not condition. Usage is inferable rather than stated.

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