Skip to main content
Glama

assert_that

Check page or element conditions like presence, visibility, text, title, or URL, and receive a clear error when the assertion fails.

Instructions

Assert a condition about the page or an element. Raises an exception (surfaced back as an error string) if the assertion fails within the timeout (default 7 seconds). timeout applies only to element/text checks. (For url or title checks, the assertion either passes or fails right away.) Args: check: 'element_present', 'element_visible' (need selector); 'text' (substring of expected within selector, default 'html'); 'title', 'url' (exact match), or 'url_contains' (need expected). selector: Element to check. Used by 'element_present', 'element_visible', and 'text'. expected: The text/title/url to check against. Not used for the element-only checks. exact: For check='text', require an exact match instead of a substring match. timeout: Seconds to wait before failing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
checkNoelement_visible
exactNo
timeoutNo
expectedNo
selectorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 it discloses key behavior: it raises an exception surfaced as an error string, honors a default 7-second timeout, and applies timeout only to element/text checks. It also clarifies exact-match versus substring behavior for text checks and immediate pass/fail for url/title checks.

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?

The description is front-loaded with purpose and error behavior, then uses a compact Args list. Every sentence adds operational detail, and there is no filler or repetition of schema defaults.

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?

Given the tool's interdependencies among check modes, selector, expected, exact, and timeout, the description covers the necessary context thoroughly. An output schema exists, so not detailing the success return value is acceptable. The main caveats, such as timeout not applying to url/title checks, are explicitly stated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 0% description coverage, yet the description explains every parameter's role and dependencies: which checks need selector, expected, exact, and timeout. This goes well beyond the bare schema and gives an agent enough to construct valid calls.

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?

The description states a clear verb and resource: 'Assert a condition about the page or an element.' It enumerates the exact check types and their required arguments, so an agent can distinguish this from sibling tools like wait_for or check_state based on the exception-raising assertion behavior.

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?

The description gives clear usage context for each check mode, including which arguments are required and that timeout only applies to element/text checks while url/title checks are immediate. It does not explicitly compare against alternatives or state when not to use this tool, so it stops short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/seleniumbase/seleniumbase-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server