Skip to main content
Glama

browser_sync_barrier

Blocks execution until a JavaScript predicate returns truthy on every specified tab. Use it to wait for all tabs to be ready before automation continues.

Instructions

Block until a JS predicate returns truthy on every listed tab.

Replaces hand-rolled "wait for everything to be ready" loops.

Args: tab_ids: Tabs to monitor. predicate: JS expression that returns truthy when the tab is ready, e.g. "!!document.querySelector('.results')". timeout: Overall timeout in ms. poll_interval: Per-poll interval in ms.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idsYes
timeoutNo
predicateYes
poll_intervalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 behavioral burden. It discloses the blocking semantics, per-tab predicate evaluation, and the polling cadence implied by poll_interval, but says nothing about what happens on timeout (error vs. false return), whether the predicate runs in each page's JS context, or whether it can fail on a single tab.

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?

Core behavior is front-loaded in the first sentence, rationale follows, and the Args block is clean and compact. Every line earns its place, including the predicate example, and there is no redundant restatement of the schema defaults.

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 moderately complex multi-tab blocking barrier with no annotations and no output schema, the definition covers behavior and parameters but omits failure semantics (timeout outcome, partial-readiness behavior) and any expected return value. Adequate for invocation, incomplete for confident use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it largely does: it explains all four params, gives units for timeout and poll_interval ('in ms'), and supplies a concrete predicate example. It does not cover edge semantics such as empty tab_ids or predicate evaluation errors, so it falls just short of exhaustive.

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?

Specific verb (block/wait), resource (listed tabs), and condition (JS predicate truthy on every tab). The phrase 'on every listed tab' distinguishes it from the many single-tab wait siblings (browser_wait_for_element, browser_wait_for_result, browser_wait_for_network_idle), and the 'replaces hand-rolled loops' line reinforces the multi-tab synchronization purpose.

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?

'Replaces hand-rolled "wait for everything to be ready" loops' gives a concrete scenario that makes the use case clear. However, it never names a sibling alternative or states when NOT to use it (e.g., single-tab waits or browser_parallel), so it stops short of full routing guidance.

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