Skip to main content
Glama
BrowserGenie

BrowserGenie MCP Server

by BrowserGenie

assert_element

Validates element conditions such as visibility or text content in automated tests, returning pass/fail status and actual value.

Instructions

Assert a condition on an element. Returns whether the assertion passed, the actual value, and a message. Essential for automated testing workflows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assertionYesType of assertion to check
selectorYesCSS selector for the element
expectedNoExpected value for textEquals, textContains, or valueEquals
attributeNameNoAttribute name for hasAttribute assertion
classNameNoClass name for hasClass assertion
tabIdNoTarget tab ID (defaults to currently active tab)
apiKeyNoAPI key for authentication if enabled
Behavior2/5

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

No annotations provided, and description only mentions return values. Lacks details on side effects, permissions, or whether the tool modifies state. Implies non-destructive but not explicit.

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?

Two short sentences that convey the core function and context. No wasted words.

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?

No output schema, so description must compensate. It mentions return values but lacks details on format or non-required parameters like tabId, apiKey. Adequate but not comprehensive.

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 covers 100% of parameters with descriptions. Description adds no extra meaning beyond schema; baseline 3 justified.

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

Purpose4/5

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

Description clearly states it asserts a condition on an element and returns pass/fail, actual value, and message. However, it does not differentiate from sibling assert tools like assert_css_property.

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 on when to use vs alternative tools like assert_css_property or assert_network_request_made. Simply says 'essential for automated testing workflows'.

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/BrowserGenie/mcp'

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