Skip to main content
Glama

assert_text

Verify a web element's displayed text equals or contains the expected value, with configurable selector and timeout for automated UI testing.

Instructions

Assert element text equals or contains expected value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNocss
exactNo
timeoutNo
expectedYes
selectorYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the core assertion behavior but does not explain what happens on failure, whether the tool waits for the element, how exact matching interacts with contains, or whether text is normalized before comparison.

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?

The description is a single efficient sentence with no filler. It front-loads the action and states the primary matching behavior, though it could earn a 5 with slightly more behavioral context.

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

Completeness2/5

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

Given no annotations, no output schema, and 0% schema coverage, the description is too sparse to fully support correct invocation. An agent is left without critical details about assertion failure handling, the effect of `exact`, timeout semantics, and selector strategy.

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%, so the description must compensate, but it only clarifies the purpose of `expected` and `selector` at a high level. It adds no meaning for `by`, `exact`, or `timeout`, leaving the agent to infer their roles from names and defaults.

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 and resource: 'Assert element text equals or contains expected value.' It clearly distinguishes this tool from siblings like assert_title, assert_url, and assert_page_contains by focusing on element text.

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

Usage Guidelines3/5

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

The description implies the tool is for verifying element text content, but it does not explicitly state when to prefer this over alternatives like get_text, assert_page_contains, or assert_attribute. An agent can infer the usage context from the name and description, but no direct guidance or exclusions are provided.

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

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/hakanngul/testfly-mcp'

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