Skip to main content
Glama
surfskyio

surfsky-mcp

Official
by surfskyio

Wait for the page

surfsky_wait
Read-onlyIdempotent

Wait for a page to meet a condition (selector, text, URL, or time), then return its URL and title. Use after actions or navigation when content loads dynamically.

Instructions

Wait until the active tab meets a condition, then return its url and title. Use it for content that loads after an action or after a domcontentloaded navigation; actions already settle on their own, so no wait is needed after every step. Conditions: selector present (or gone), url_contains, text on the page, seconds; when several are given they are waited one after another, each with the full timeout. For elements that do not exist yet use a CSS selector: @N and text=words must resolve now. A condition not met in time fails with a timeout error and the page is left as it is. For a condition only script can check, use surfsky_evaluate with an async function that polls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goneNoWith selector: wait until it is absent or has no layout box, instead of present.
textNoString the page's visible text must contain.
secondsNoFixed sleep in seconds, after the other conditions.
timeoutNoSeconds allowed per condition (default 30).
selectorNoElement to wait for: a CSS selector (works for elements that do not exist yet), @N, or text=words.
session_idNoSession from surfsky_session_start. Omit for the shared default session, started on first use.
url_containsNoSubstring the page URL must contain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive. The description adds valuable behavioral context: conditions are waited one after another with full timeout each, unmet conditions fail with a timeout and leave the page untouched, and the tool returns url and title. This goes well beyond the annotation baseline.

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 dense but every sentence earns its place: purpose, usage context, condition semantics, selector nuance, failure behavior, and alternative routing. It is front-loaded with the core behavior and does not waste words.

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

Completeness5/5

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

Despite having no output schema, the description states the return values (url and title). Combined with the fully documented input schema and annotations, it covers the essential operational details: timeout behavior, failure mode, selector syntax, condition combinations, and when to use a sibling tool instead.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds meaning beyond the schema: it distinguishes CSS selectors that work for not-yet-existing elements from @N and text=words that must resolve immediately, and it explains how multiple conditions are sequenced and each gets the full timeout. These are not obvious from the parameter definitions alone.

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 uses a specific verb and resource: 'Wait until the active tab meets a condition, then return its url and title.' It clearly distinguishes the tool's purpose from siblings by naming surfsky_evaluate as the alternative for script-only conditions and by focusing on waiting for asynchronous page states.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use the tool: 'after an action or after a domcontentloaded navigation,' and gives a clear when-not: 'actions already settle on their own, so no wait is needed after every step.' It also names the alternative tool for conditions only script can check.

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