Skip to main content
Glama
seleniumbase

SeleniumBase MCP Server

Official
by seleniumbase

assert_text

Verifies expected text exists on the current page or inside a specific element, returning an error if not found.

Instructions

Assert that text is present on the page, or within a specific element.

Raises an error (returned as a tool error to the client) if not found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
selectorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It does disclose the key behavior that an error is raised and returned as a tool error when text is not found, which is useful. However, it doesn't disclose matching semantics (exact vs substring, case sensitivity) or whether the tool waits for text to appear.

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 short sentences. The first states the core operation, and the second clarifies the failure mode. No filler, no redundant details.

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?

For a simple assertion tool, the description gives the essential behavior of erroring when not found. But it is incomplete in important contexts: it doesn't say whether the assertion is instantaneous or waits, and it doesn't distinguish itself from wait_for_element, which is especially important given the sibling list.

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 0%, so the description must compensate. It does add broad meaning for text and selector by saying text can be on the page or within an element, but it never defines the selector syntax or the exact matching behavior for text. That leaves important parameter semantics unresolved.

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?

The description clearly states the action: assert that text is present on the page or within an element. It's specific enough to separate it from tools like get_text, since it explicitly raises an error when text is missing, though it doesn't name sibling tools.

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 about when to use this assertion instead of alternatives like wait_for_element, get_text, or is_element_visible. The description implies it is a check, but does not explain timing, retries, or when a user should choose a waiting/reading tool.

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