Skip to main content
Glama
seleniumbase

SeleniumBase MCP

Official

assert_text

Check that specified text exists in a given element on a webpage, ignoring surrounding whitespace, within a configurable timeout. Defaults to the full page and throws an error if not found.

Instructions

Assert that the text substring appears within the given element (with the matching selector) in the given timeout (seconds), with leading and trailing whitespace automatically ignored. If no selector given, then it defaults to "html" (CSS selector). If no timeout given (0 or None), then SeleniumBase uses 7 seconds. Raises an exception if the element isn't found or assertion fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
timeoutNo
selectorNohtml

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so well. It discloses the assertion behavior, substring semantics, whitespace trimming, default selector and timeout behavior, and the exception-raising behavior on failure. This gives an agent a reliable model of what happens when the tool is called.

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?

Three focused sentences front-load the core behavior, then cover defaults and error behavior. Every sentence adds necessary detail and there is no redundancy or filler.

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?

For a relatively simple assertion tool with no annotations and an output schema present, the description is complete. It covers all parameters, defaults, matching semantics, and failure behavior. Nothing essential for invoking the tool correctly is missing.

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?

Schema description coverage is 0%, so the description must compensate. It does: 'text' is described as the substring to assert, 'selector' as the CSS selector defaulting to 'html', and 'timeout' as seconds defaulting to 7 when 0 or None. This fully explains the three parameters despite the bare schema.

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 uses a specific verb ('Assert') and resource ('text substring appears within the given element'), and distinguishes itself from siblings like assert_exact_text by explicitly saying 'substring' and noting whitespace is ignored. It also clarifies that the target element is selected via a CSS selector, which is a distinct operation from title/URL assertions.

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 provides clear context for when to use the tool: to assert a substring within an element with optional selector and timeout. It implies the distinction from exact-text matching and other assertion tools, but it does not explicitly name alternatives or state when not to use this tool. This is clear context without exclusion guidance.

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'

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