Skip to main content
Glama

inspect_mode

Enable element inspection to copy names by clicking on webpage components, facilitating clear communication of design changes.

Instructions

Toggle inspect mode on the annotated page. When ON, the user can click any element to copy its name. When OFF, the page behaves normally. Use this to help the user copy element names for communicating design changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enabledYestrue to enable inspect mode, false to disable

Implementation Reference

  • The tool 'inspect_mode' handler in src/index.js calls the proxy's inspectOn/inspectOff methods.
    // Tool 5: Toggle inspect mode
    mcp.tool(
      'inspect_mode',
      'Toggle inspect mode on the annotated page. When ON, the user can click any element to copy its name. When OFF, the page behaves normally. Use this to help the user copy element names for communicating design changes.',
      {
        enabled: z.boolean().describe('true to enable inspect mode, false to disable'),
      },
      async ({ enabled }) => {
        if (enabled) {
          proxy.inspectOn();
        } else {
          proxy.inspectOff();
        }
        return {
          content: [{
            type: 'text',
            text: enabled
              ? 'Inspect mode ON. The user can now click any element to copy its name. A toolbar indicator shows the mode is active.'
              : 'Inspect mode OFF. Page is back to normal interactive mode.',
          }],
        };
      }
    );
  • The proxy helper functions that queue commands to be sent to the browser.
    inspectOn: () => { pendingCommands.push({ type: 'inspect_on' }); },
    inspectOff: () => { pendingCommands.push({ type: 'inspect_off' }); },

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