Skip to main content
Glama

assert

Validate browser automation state by checking text, visibility, URL, element counts, or selector presence in one unified call.

Instructions

Unified assertion (text/visible/hidden/url/count/element)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
typeYes
stateNo
patternNo
timeoutNo
expectedNo
operatorNo
selectorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.3.0

TDQS

C2/5.0
Behavior1/5

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

With no annotations, the description carries the full behavioral burden, yet it discloses nothing about failure behavior, waiting/retry semantics, return values, or side effects. It is just a list of types, so an agent cannot predict how the tool behaves.

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

Conciseness2/5

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

The single parenthetical is concise but severely under-specified. It is not front-loaded with any useful context, and the brevity comes at the cost of clarity rather than being efficient communication.

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

Completeness1/5

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

For an 8-parameter tool with no annotations and no output schema, the description is completely inadequate. It fails to cover parameter usage, behavioral expectations, or output, leaving major gaps an agent must guess at.

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

Parameters2/5

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

Schema description coverage is 0% across 8 parameters. The description maps the 'type' enum values to assertion kinds, which is some help, but it does not explain state, pattern, timeout, expected, operator, or selector, leaving most parameters undocumented in both schema and description.

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

Purpose3/5

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

The description names the verb 'assert' and enumerates the assertion types (text/visible/hidden/url/count/element), which gives a rough idea of what it does. However, it doesn't state the tool's purpose in a full phrase or distinguish it from siblings like exists, is_visible, wait_for, or get_text, leaving ambiguity about its role in the suite.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus alternatives. For example, it doesn't say whether to prefer assert over exists or wait_for, or whether it waits for a condition before failing.

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