Skip to main content
Glama

validation_element

Validate DOM element states: existence, visibility, enabled, text content, attributes, and count. Returns pass/fail details with evidence screenshots.

Instructions

验证特定DOM元素的状态:存在性、可见性、可用性、文本内容、属性、值、数量等。支持多条断言组合,返回每条断言的通过/失败详情和证据截图。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo目标页面URL(可选,若提供则会先导航到该页面)
nameNo本次验证的名称(用于证据标记)
existsNo断言元素是否存在
enabledNo断言元素是否可用(非 disabled 且非 readonly)
visibleNo断言元素是否可见
evidenceNo是否采集证据(截图+快照),默认 true
noErrorsNo是否同时检查本轮无控制台/页面/网络错误,默认 true
selectorYes元素CSS选择器(必填)
snapshotNo是否在证据中包含DOM快照
screenshotNo是否在证据中包含截图(默认在断言失败时自动截图)
clearErrorsNo是否在验证前清空历史错误日志,默认 true
countEqualsNo断言匹配选择器的元素数量
valueEqualsNo断言表单元素的值等于该内容
hasAttributeNo断言元素具有该属性名
textContainsNo断言元素文本包含该内容
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. It mentions returning pass/fail details and evidence screenshots, but does not disclose read-only nature, side effects, error handling, or response format. This is insufficient for a tool with no annotations.

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 two concise sentences that efficiently cover core functionality and output. Every word contributes to understanding, with no redundancy or filler.

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

Completeness3/5

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

With 15 parameters, no output schema, and no annotations, the description provides a good overview but lacks details on output structure, error handling, and assertion ordering. It adequately covers what the tool does but leaves gaps for an agent to fully understand behavior.

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 parameters are well-documented in the schema. The description adds an overview of assertion types and evidence collection, but does not elaborate on parameter usage beyond the schema. Baseline 3 is appropriate.

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 verb 'validate' and the resource 'specific DOM element state', listing specific aspects like existence, visibility, text content, etc. It distinguishes itself from sibling tools by emphasizing multi-assertion combination and evidence output.

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 usage for verifying DOM element states, but does not provide explicit when-to-use or when-not-to-use guidance. It lacks mention of alternatives or prerequisites, leaving the agent to infer context from sibling tool names.

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/validpilot/ai-verify-mcp'

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