Skip to main content
Glama

page.highlight

Draw a DevTools highlight over a chosen page element so a human can see which element an AI agent is inspecting. Follow with page.screenshot to confirm the correct element.

Instructions

Draw the DevTools highlight over an element so a human can see what the AI is looking at. Follow with page.screenshot to verify the right element was found.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "page.highlight"
  }
}

Input Schema

NameRequiredDescriptionDefault
nthNoZero-based index when the locator matches several elements.
refNoSnapshot ref (eNN) from page.snapshot.
textNoVisible text of the element.
xpathNoXPath expression.
frame_idNoFrame to search within; see page.list_frames.
selectorNoCSS selector; pierces shadow DOM.
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
duration_msNo
backend_node_idNoCDP backendNodeId, e.g. from inspector.pick.
scroll_into_viewNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations supply readOnlyHint=false and openWorldHint=true, and the description adds the key behavioral fact beyond them: the effect is a visible DevTools overlay aimed at a human, not a page mutation. It does not mention whether the highlight persists, how long it stays (duration_ms is undocumented), or whether it affects the page DOM.

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?

Two short sentences with zero filler; the purpose leads and the verification step follows. Every clause carries information.

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?

No output schema exists, but the description is adequate for a single-effect visual tool with all parameters optional and well-documented in the schema. Minor gaps remain around duration_ms and locator precedence, which an agent resolving an element would benefit from knowing.

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 82%, so most of the 11 parameters are already documented, including all the locator strategies (ref, selector, xpath, text, backend_node_id). The description adds no meaning about how multiple locators interact or which takes precedence, so the baseline 3 applies.

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 and resource ('Draw the DevTools highlight over an element') plus the intent ('so a human can see what the AI is looking at'). That distinguishes it from page.screenshot, which is named only as a follow-up rather than a substitute, so the sibling boundary is implied rather than spelled out.

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 a clear usage context (visual confirmation for a human observer) and an explicit next step ('Follow with page.screenshot to verify'). It stops short of saying when not to use it or what to do if the highlight targets the wrong element.

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