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' }); },
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 explains the behavioral effect ('When ON, the user can click any element to copy its name. When OFF, the page behaves normally') and the practical use case. However, it lacks details on permissions, side effects, or error conditions that might be relevant for a mode-toggle tool.

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 front-loaded with the core purpose, followed by behavioral details and usage guidance in three concise sentences. Each sentence adds value without redundancy, making it efficient and well-structured.

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 (one parameter, no output schema, no annotations), the description is reasonably complete. It covers purpose, behavior, and usage context. However, it could be more thorough by addressing potential errors or prerequisites, slightly reducing completeness.

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 single parameter 'enabled' with its description. The description does not add any additional meaning or context beyond what the schema provides, such as default states or interaction effects, meeting the baseline for high coverage.

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: 'Toggle inspect mode on the annotated page' with specific functionality ('When ON, the user can click any element to copy its name. When OFF, the page behaves normally'). It distinguishes from siblings by focusing on toggling a mode rather than annotation, retrieval, highlighting, or rescanning.

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?

The description provides clear context for when to use the tool: 'Use this to help the user copy element names for communicating design changes.' This gives a practical scenario, but it does not explicitly state when not to use it or name alternatives among siblings.

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