Skip to main content
Glama
zersys
by zersys

get_elements_by_test_id

Locate visible UI elements in a React Native app by their testID. Falls back to context analysis and correction suggestions if no match found.

Instructions

Find visible elements matching a React Native testID. Use exact first, then contains. If none, call get_screen_context + get_test_id_remediation_plan.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdNo
testIdYes
maxDepthNo
maxNodesNo
limitNo
clickableOnlyNo
includeTextlessNo
skipVisibilityCheckNo
testIdMatchNo
Behavior3/5

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

With no annotations, the description must disclose all behavioral traits. It mentions visibility filtering ('visible elements'), matching strategy ('exact first, then contains'), and a fallback. However, it does not describe the return format, handling of multiple matches, side effects (e.g., read-only), or performance implications. This is adequate but lacks depth.

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 only two sentences, with the purpose front-loaded. Every sentence is functional: the first defines the action, the second provides usage strategy. No redundant or extraneous information.

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 the tool's complexity (9 parameters, no output schema, 21 siblings), the description is insufficient. It omits parameter explanations, return value structure, and edge cases. The fallback guidance is helpful but does not compensate for the missing information needed to use the tool effectively.

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?

The input schema has 9 parameters with 0% coverage in the description. The only hint is 'exact first, then contains' relating to testIdMatch. Parameters like maxDepth, clickableOnly, skipVisibilityCheck remain unexplained. The description adds almost no meaning beyond the schema, which is critical for correct invocation.

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 clearly states the tool's purpose: 'Find visible elements matching a React Native testID.' It specifies the matching strategy ('exact first, then contains') and distinguishes itself from sibling tools like get_screen_test_ids and get_visible_elements by focusing on a single test ID with a fallback plan.

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 explicit guidance: 'Use exact first, then contains. If none, call get_screen_context + get_test_id_remediation_plan.' This tells the agent the matching hierarchy and what to do when no match is found. However, it does not explicitly state when not to use this tool versus alternatives, earning a 4 rather than a 5.

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/zersys/rn-debug-mcp'

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