Skip to main content
Glama
91fapiao-cn

playwright-browser-skill

by 91fapiao-cn

browser_wait_for_function

Wait for a JavaScript function in the browser to return true. Use to pause automation until a specific condition is met, with optional polling interval and timeout.

Instructions

等待函数返回true

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fnYes
argNo
pollingNo
timeoutNo
Behavior2/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It only states the core condition (function returns true), but fails to mention critical details such as polling behavior, timeout handling, error outcomes, execution context, or whether the function is evaluated in the page or Node.js environment.

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

Conciseness3/5

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

The description is a single short sentence, which is concise, but it is under-specified. While it is front-loaded with the core purpose, the extreme brevity leaves out essential behavioral and parameter information, making it less useful than a slightly longer but 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 tool's moderate complexity (4 parameters, no output schema, no annotations), the description is grossly incomplete. An agent cannot infer how to construct the function, what polling/timeout mean, or what happens on success or failure. This is insufficient for reliable tool invocation.

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?

Schema description coverage is 0%, and the description provides no explanations for the parameters. The meaning of 'fn', 'arg', 'polling', and 'timeout' (units, required format, semantics) is entirely omitted, leaving the agent to guess.

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 the tool's action: wait for a function to return true. This distinguishes it from sibling wait tools that wait for selectors, URLs, or network events, though it could be more explicit about the custom JavaScript function evaluation context.

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 on when to use this tool versus alternatives like browser_evaluate or browser_wait_for_selector. The description does not mention use cases, prerequisites, or fallback options.

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/91fapiao-cn/playwright-browser-skill'

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