Skip to main content
Glama

query_preview_state

Get a live snapshot of the connected browser page's form values, route, selection, or focus. Return current preview state to verify user interactions and debug issues.

Instructions

Asks the connected browser page for a live state snapshot. Kinds: 'form' (all input/textarea/select values, password fields filtered), 'route' (current URL/pathname), 'selection' (highlighted text), 'focus' (focused element selector + value), 'all' (combined). Times out in 800ms if no host page is connected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesWhich slice of preview state to query.
selectorNoOptional CSS selector to scope the query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden, and it does so well. It discloses that the operation is a live snapshot request, that password fields are filtered out of form results, and that it times out in 800ms when no host page is connected. These are meaningful behavioral traits beyond the schema, giving the agent accurate expectations about safety and failure behavior.

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 compact and front-loaded, with the core action in the first sentence and the most important behavioral caveats (password filtering, timeout) included without filler. Every clause earns its place, and the list of kinds is structured for quick parsing.

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?

For a two-parameter tool with no output schema and no annotations, the description is remarkably complete. It explains what the tool returns for each kind, warns about password filtering, and specifies the timeout failure mode when no host page is connected. An agent has enough context to select, invoke, and interpret the result correctly.

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 coverage is 100%, so the schema already documents both parameters, but the description adds substantial meaning beyond the bare field names. It explains what each 'kind' value returns, notes password filtering, and clarifies that 'combined' is available. The optional 'selector' parameter is less elaborated, but the schema's 'Optional CSS selector to scope the query' is adequate there.

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 opens with a specific verb and resource: 'Asks the connected browser page for a live state snapshot.' It then enumerates the exact kinds ('form', 'route', 'selection', 'focus', 'all'), making the tool's purpose unambiguous. It also distinguishes itself from the session/log/event/error siblings by framing this as a page-state query rather than historical or session data.

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 establishes clear usage context: use this when you need the current live state of the connected browser page, especially form values, route, selection, or focus. It does not explicitly name sibling alternatives or state when not to use them, but the sibling names (get_session_info, get_event_log, get_runtime_errors, tail_events) are clearly different domains, so the intended placement is reasonably obvious.

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