Skip to main content
Glama

Label interactive elements (set-of-mark)

label_interactives

Paint numbered badges on all interactive elements in a webpage and return a legend mapping each number to a unique selector and accessible label, enabling targeted actions on specific elements.

Instructions

Set-of-mark prompting: paints a numbered badge over every interactive element in the viewport — links, buttons, inputs, selects, ARIA widgets, anything with a pointer cursor — and returns the marked screenshot plus a legend mapping each number to a stable, unique selector and its accessible label. Pick your target off the picture by number, then act on its exact selector with interact_and_audit. The overlay is removed after capture.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute URL to open, e.g. http://localhost:5173.
reloadNoReload even if the URL is already open (default reuses it, so it can be stale after an edit).
viewportNoSwitch to this breakpoint first. Default: keep the current one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.29.0

TDQS

A4.3/5.0
Behavior4/5

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

Since no annotations are provided, the description carries the full burden. It describes the overlay behavior, the elements targeted (including pointer cursor), and the output schema (screenshot plus legend). It also notes the overlay is removed after capture. It doesn't mention potential failures like non-interactive pages or permission issues, but gives solid context for a non-destructive tool.

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?

The description is three sentences, each earning its place: explains the mechanism, provides usage guidance, and notes the cleanup behavior. Slightly long but well-structured, with the core purpose front-loaded. No fluff.

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?

For a tool that takes only a URL and optional parameters, the description covers the input-output contract well: what gets marked, output format, and how to use the results. It doesn't describe error cases or edge cases (e.g., no interactives found), but given the simplicity and clear schema, it's complete enough for correct invocation.

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 three parameters. The description doesn't add parameter-specific semantics beyond 'url', but it does implicitly clarify the viewport parameter by mentioning breakpoint switching. Since coverage is high, baseline 3 is appropriate.

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 clearly states the tool's function: paints numbered badges on all interactive elements, returns a marked screenshot with a legend. It distinguishes itself from siblings by specifying the set-of-mark technique and the specific output (legend with selectors and labels), which is unique among the listed tools.

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?

Explicitly provides usage guidance: 'Pick your target off the picture by number, then act on its exact selector with interact_and_audit.' This tells the agent when to use this tool and how to chain it with a sibling. Also notes the overlay is removed after capture, implying it's a one-shot labeling step.

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