Skip to main content
Glama

inspect

Open a URL in the logged-in recording profile and list visible interactive elements with ranked unique selectors, headings, and iframes so you can write reliable automation targets without selector guessing.

Instructions

Open a URL in the recording profile (logged-in state included) and list every visible interactive element with UNIQUE selectors ranked data-testid → id → aria-label → role/text → name/placeholder → class → path, plus headings and iframes. Use it BEFORE writing targets — no selector guessing, no wasted probe. Writes logs/inspect-.json and a screenshot in the demo dir. Returns a jobId immediately — poll job_status. Rejects if another job is running.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dir": "<dir>",
      "url": "<url>"
    },
    "name": "inspect"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirYesdemo project directory — pass an absolute path
urlYespage to inspect (absolute URL)
limitNomax elements (default 80)
framesNoiframe selectors to scan too, as in the storyboard `frames` block
profileNoChrome user-data dir (default: the recording profile)
headlessNodefault true
useSetupNohonour the storyboard's setup block (storageState/cookies/preflight) so an authenticated page can be scanned. Default true.
viewportNodefault 1280x720 (use the storyboard's video size)
storageStateNoextra Playwright storageState JSON to seed before the scan

Output Schema

NameRequiredDescriptionDefault
kindYes
jobIdYes
statusYes
demoDirYesresolved absolute demo directory
logFileYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.20.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / frames / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / viewport / properties / height / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / viewport / properties / height / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / viewport / properties / width / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / viewport / properties / width / minimum
      Added value: +-9007199254740991
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed2 schema fields changedv0.15.1
    • addedInput schema / properties / storageState
      Added value: +{
      +  "description": "extra Playwright storageState JSON to seed before the scan",
      +  "type": "string"
      +}
    • addedInput schema / properties / useSetup
      Added value: +{
      +  "description": "honour the storyboard's setup block (storageState/cookies/preflight) so an authenticated page can be scanned. Default true.",
      +  "type": "boolean"
      +}
  3. Addedv0.14.1

TDQS

A4.2/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and mostly delivers: it discloses async behavior (returns jobId immediately), side effects (writes logs/inspect-<n>.json and a screenshot in the demo dir), a concurrency guard, authentication context (recording profile with logged-in state), and the setup/storageState honoring. It omits expected runtime, timeouts, and whether prior inspect artifacts are overwritten.

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?

Front-loaded with purpose, then usage directive, then side effects and async contract — the ordering matches what an agent needs. It is dense and slightly run-on in the selector-ranking clause, but every sentence carries actionable information.

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?

Complete for a nine-parameter async browser tool: auth profile, output artifacts, selector priority, concurrency rejection, polling handoff, and defaults are all stated. An output schema exists, so it correctly does not spend words describing the return payload beyond the immediate jobId.

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?

Schema description coverage is 100%, so the schema already documents all nine parameters and the baseline is 3. The description adds a little context by naming the recording profile and logged-in state (tying to the `profile` default) and the frames/storyboard convention, but it does not refine limit, viewport, or storageState semantics 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?

States a specific verb (Open a URL, list elements) and resource (visible interactive elements), and pins down the deliverable precisely: unique selectors ranked data-testid → id → aria-label → role/text → name/placeholder → class → path, plus headings and iframes. An agent can distinguish this from `probe` without opening either schema.

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?

Explicitly says "Use it BEFORE writing targets — no selector guessing, no wasted probe", which gives both a when-to-use trigger and an implicit alternative (probe). It also states a precondition ("Rejects if another job is running") and the follow-up action (poll job_status). No explicit when-not-to-use case beyond the concurrency guard.

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