Skip to main content
Glama

Inspect live page DOM

inspect-page
Read-onlyIdempotent

Open a URL headlessly to map elements with unique Playwright locators, CSS selectors, visibility, text, and console logs. Run actions or stored sessions to view signed-in states.

Instructions

Open a URL headlessly and return its elements with Playwright locators proven unique on the page (role + name first), CSS selectors, visibility, text and console messages. storageState/headers open it signed in; actions click/fill first to reach a state. view 'locators' is the compact map.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesFull URL of the page to open (http/https)
viewNo'locators': compact map of interactive elements (cheapest); 'elements' (default): DOM inventory
actionsNoSteps run after load to reach a state (modal, step 3)
headersNoExtra HTTP headers, e.g. Authorization
waitForNoWait for this selector first
selectorNoCSS selector: inspect matches instead of the whole DOM
viewportNo
timeoutMsNoOverall inspection limit in ms (default 45000)
waitUntilNoNavigation wait condition (default domcontentloaded)
includeHtmlNoInclude the rendered HTML (truncated)
projectRootNoProject whose Playwright launches the browser (default: server root)
maxHtmlCharsNoHTML cap when includeHtml is set (default 20000)
storageStateNoLogged-in session: storageState JSON inside the project, e.g. playwright/.auth/user.json

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A4/5.0
Behavior4/5

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

Annotations already supply readOnlyHint, openWorldHint and idempotentHint, so the safety profile is covered. The description adds meaningful behavior beyond that: the browser runs headless, actions are executed before inspection, and console messages are captured. It doesn't say how failures (nav timeout, missing locator) surface, which is the remaining gap.

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

Conciseness4/5

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

It is three tight, front-loaded sentences with no filler; the core behavior leads and the usage hints follow. Phrasing is telegraphic ('storageState/headers open it signed in'), which is efficient but slightly compressed for a 13-parameter tool.

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?

With 13 parameters, nested action objects and no output schema, the description does the important work of enumerating what is returned and how auth/actions affect the result. Missing are error/timeout behavior and truncation semantics, but the essentials for correct invocation are present.

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 92%, so the baseline is 3, but the description adds real meaning: storageState/headers are framed as the signed-in path and actions as the way to reach a state (modal, step 3). The view enum is likewise described by cost/size rather than just restating the enum values.

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?

States a concrete verb+resource (open a URL headlessly and return its elements) plus the returned payload: locators, CSS selectors, visibility, text, console messages. It is far more specific than a sibling like run-test, but it never explicitly contrasts itself with validate-selector or generate-e2e-test, so the agent must infer the boundary.

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?

Gives clear operational context: storageState/headers open the page signed in, actions click/fill first to reach a state, and view 'locators' is the compact/cheapest map. It does not name an alternative tool or state when-not to use this one, so it stops short of explicit routing.

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