Skip to main content
Glama

assert_text

Assert that a mobile UI element with a specific resource ID displays the expected text, enabling automated verification of on-screen content during tests.

Instructions

Assert that an element with a given resource ID contains the expected text

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idNoTarget device ID. If omitted, uses the default device.
resource_idYesBare resource-id, e.g. login_button; regex full-match
expected_textYesThe expected text content of the element

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.8.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of explaining behavior, but it does not disclose whether the assertion waits, fails the test, returns a boolean, or throws an error. The word 'Assert' implies a check, but the observable effects and failure semantics are left unspecified.

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?

The description is a single, tightly worded sentence that immediately conveys the tool's purpose. There is no filler or redundant information; every word contributes to understanding.

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?

For an assertion tool with no output schema and no annotations, the description lacks critical context about success/failure behavior, waiting semantics, and how it differs from wait_for_text. An agent cannot fully predict the tool's runtime behavior from this definition alone.

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 100%, so the baseline is 3. The description essentially restates the relationship between resource_id and expected_text without adding new meaning beyond the schema, so no higher score is warranted.

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 a specific verb ('Assert') and resource ('an element with a given resource ID contains the expected text'), making the tool's core function evident. It does not explicitly distinguish it from siblings like wait_for_text or assert_visible, so it stops short of a 5.

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 provided about when to use this tool versus alternatives such as wait_for_text, is_element_visible, or assert_visible. The description only states what the tool does, not under what conditions it should be chosen or avoided.

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