Skip to main content
Glama

highlight_element

Visually identify web page elements by briefly highlighting them with a flash effect to confirm element selection during UI annotation.

Instructions

Briefly flash-highlight a specific element on the page so the user can see which element you are referring to. Useful for confirming "do you mean this element?"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe element name or CSS selector to highlight

Implementation Reference

  • The 'highlight_element' tool is registered in src/index.js. When called, it invokes the 'proxy.highlight' method to send a command to the browser.
    mcp.tool(
      'highlight_element',
      'Briefly flash-highlight a specific element on the page so the user can see which element you are referring to. Useful for confirming "do you mean this element?"',
      {
        name: z.string().describe('The element name or CSS selector to highlight'),
      },
      async ({ name }) => {
        proxy.highlight(name);
        return {
          content: [{
            type: 'text',
            text: `Highlighted "${name}" on the page. The user should see a brief red flash around the element.`,
          }],
        };
      }
    );
  • The 'highlight' method in proxy.js adds a 'highlight' command to the 'pendingCommands' queue, which the browser polls for via the '/__annotator/commands' endpoint.
    highlight: (name) => { pendingCommands.push({ type: 'highlight', name }); },
Behavior3/5

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

With no annotations provided, the description carries the full burden. It describes the behavior ('briefly flash-highlight') and purpose ('so the user can see'), but lacks details on duration, visual style, or any constraints like rate limits or permissions. It's adequate but has gaps in behavioral context.

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 appropriately sized and front-loaded, with two concise sentences that directly explain the tool's action and use case. Every sentence earns its place without redundancy or unnecessary elaboration.

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?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is mostly complete. It covers purpose and usage well, but could benefit from more behavioral details like flash duration or visual feedback. Without annotations or output schema, it's sufficient but not exhaustive.

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 the parameter. The description adds minimal semantics by implying the parameter identifies the element to highlight, but doesn't provide extra details like format examples or constraints beyond what the schema states. 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 purpose with specific verbs ('flash-highlight') and resource ('a specific element on the page'), and distinguishes it from siblings by explaining its unique use case for confirmation ('do you mean this element?'). It goes beyond a simple restatement of the name.

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?

The description explicitly states when to use this tool ('useful for confirming "do you mean this element?"'), providing clear context and purpose. It implies alternatives by suggesting this is for confirmation rather than other actions like annotation or inspection, though it doesn't name specific sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcpware/ui-annotator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server