Skip to main content
Glama

Assert element

assertElement
Read-only

Checks whether a UI element exists and matches conditions like checked, enabled, or clickable state on an Android device.

Instructions

Assert element presence and state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
classNo
serialNo
resourceIdNo
contentDescNo
shouldExistNo
textContainsNo
caseInsensitiveNo
shouldBeCheckedNo
shouldBeEnabledNo
shouldBeClickableNo
resourceIdContainsNo
contentDescContainsNo
normalizeWhitespaceNo
Behavior2/5

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

The annotations already declare readOnlyHint=true and openWorldHint=true, so the description carries a low burden for safety. However, it adds no behavioral context: it does not explain what happens on a failed assertion, whether it throws an error, how multiple filters are combined, or that it does not wait. The phrase 'presence and state' restates the title without adding depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise, but it under-specifies a tool with 14 parameters. It is not appropriately sized; the brevity is a result of missing content rather than efficient structure, making it less helpful than a longer, more informative description.

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

Completeness1/5

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

Given the complexity of a 14-parameter tool with no output schema, this one-line description is grossly incomplete. It lacks information about assertion semantics, return values, failure behavior, and parameter usage, leaving the agent with insufficient context to invoke the tool correctly beyond guessing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 14 parameters and 0% schema description coverage, the description fails entirely to clarify parameter meaning. It only vaguely alludes to presence and state but gives no explanation of textContains, caseInsensitive, shouldBeEnabled, or other filters, leaving the agent unable to understand how to construct a meaningful assertion.

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 uses the specific verb 'assert' and identifies the resource as 'element presence and state', clearly distinguishing it from siblings like findElement (locating) and waitForElement (waiting). However, it could more explicitly define what 'state' encompasses, which prevents a perfect score.

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?

There is no guidance on when to use assertElement versus alternatives such as waitForElement or findElement. The description does not mention typical verification scenarios, exclusions, or the fact that this is an immediate (non-waiting) assertion. Usage is only implied by the tool's name.

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/frndchagas/expo-android'

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