Skip to main content
Glama

tv_wait_for

Wait for a UI condition to hold instead of sleeping, with optional stability to avoid half-rendered frames; returns elapsed time and final state.

Instructions

Wait until a condition holds, instead of sleeping. Give exactly one condition. stableMs additionally requires it to keep holding, which avoids acting on a half-rendered frame. Returns the elapsed time and the final state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoThe page's visible text contains this.
sceneNoA visible scene's class contains this (e.g. player).
deviceNoDevice id from devices.json. Omit to use the default device.
selectorNoA visible element matches this CSS selector.
stableMsNoRequire the condition to hold this long before succeeding (default 0).
focusTextNoFocused element's text contains this (case-insensitive).
timeoutMsNoGive up after this long (default 15000).
expressionNoES5 expression that must evaluate truthy.
intervalMsNoPoll interval (default 250).
selectorGoneNoNo visible element matches this CSS selector (spinner gone, popup closed).
videoAdvancingNoWait until <video> currentTime is actually moving.
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It explains stableMs semantics, the rationale about half-rendered frames, and the return value. However, it does not mention that waiting is bounded by timeoutMs or what happens on timeout, leaving a meaningful gap for an agent.

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 four short sentences, front-loaded with the purpose, and every sentence adds useful information. There is no fluff or repetition.

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

Completeness4/5

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

For a tool with 11 optional parameters and no output schema, the description ties together the core behavior, the stability requirement, and the return format. It lacks timeout/error semantics, but the schema documents timeoutMs and defaults, making this fairly complete.

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?

The schema already documents all 11 parameters with 100% coverage, so by the rubric the baseline is 3. The description adds the stableMs rationale and the 'exactly one condition' rule, but it does not provide substantial additional parameter-level meaning 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 a specific verb and resource: 'Wait until a condition holds, instead of sleeping.' It also distinguishes the tool from siblings by emphasizing conditional waiting rather than state inspection, and it notes the return value. This is specific and unambiguous.

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 gives clear context for when to use the tool ('instead of sleeping') and an important constraint ('Give exactly one condition'). However, it does not explicitly name alternative tools or define when-not-to-use scenarios beyond contrasting with sleeping.

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/Ediand11/tv-debug-mcp'

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