Skip to main content
Glama

playwright_assert

Verify web pages by asserting text or element presence, returning passed status and detailed results.

Instructions

浏览器断言——对页面执行断言(文本/元素存在性),返回 passed 与详情。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conditionNo断言条件(如元素可见/文本存在)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does reveal that the tool returns passed and details, but it does not clarify whether failures throw exceptions or simply return passed=false, whether the operation has side effects, or whether any waiting/retry behavior occurs.

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 compact sentence with no filler. It front-loads the main purpose and includes the key return information, making it easy for an agent to scan quickly.

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?

For a simple one-parameter tool, the description covers basic invocation and return values. However, with no output schema and no annotations, it should also clarify what 'details' contains and how failures are represented, which are not addressed.

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 schema already documents the condition parameter with examples. The description adds a little context by mentioning text/element existence, but it does not provide additional syntax, allowed values, or formatting guidance beyond the schema.

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: perform assertions on a page for text/element existence and return passed status with details. It uses a specific verb and resource and is easily distinguished from sibling tools like playwright_navigate, playwright_click, and playwright_screenshot.

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 intended usage is implied: use after navigating to a page to verify text or element presence. However, there is no explicit guidance about when to use this tool versus alternatives or any preconditions such as 'a page must be loaded first.'

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

Deploy Server

Other Tools