Skip to main content
Glama

run_debugger_mode

Debug application issues by activating debugger mode for troubleshooting and problem resolution.

Instructions

Run debugger mode to debug issues in the application

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'run_debugger_mode' tool. It ensures Chromium is running, evaluates JavaScript in the page to collect debug information (URL, user agent, sizes, performance metrics), parses the result, and returns it as text content.
    async runDebuggerMode() {
      await this.ensureChromium();
      
      const result = await this.sendCDPCommand('Runtime.evaluate', {
        expression: `
          JSON.stringify({
            url: window.location.href,
            userAgent: navigator.userAgent,
            screenSize: \`\${screen.width}x\${screen.height}\`,
            viewportSize: \`\${window.innerWidth}x\${window.innerHeight}\`,
            performance: {
              memory: performance.memory ? {
                used: Math.round(performance.memory.usedJSHeapSize / 1024 / 1024) + 'MB',
                total: Math.round(performance.memory.totalJSHeapSize / 1024 / 1024) + 'MB'
              } : 'Not available',
              timing: performance.timing ? {
                pageLoad: performance.timing.loadEventEnd - performance.timing.navigationStart + 'ms',
                domReady: performance.timing.domContentLoadedEventEnd - performance.timing.navigationStart + 'ms'
              } : 'Not available'
            }
          });
        `,
        returnByValue: true
      });
      
      const debugInfo = JSON.parse(result.result?.value || '{}');
      
      return {
        content: [{ type: 'text', text: `Debugger Mode Results:\\n${JSON.stringify(debugInfo, null, 2)}` }],
      };
    }
  • index.js:389-390 (registration)
    The dispatch case in the CallToolRequestSchema handler that routes calls to 'run_debugger_mode' to the runDebuggerMode() method.
    case 'run_debugger_mode':
      return await this.runDebuggerMode();
  • The tool registration in ListToolsRequestSchema response, including name, description, and empty input schema (no parameters required).
      name: 'run_debugger_mode',
      description: 'Run debugger mode to debug issues in the application',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • index.js:103-344 (registration)
    The overall tool list registration via setRequestHandler for ListToolsRequestSchema, which includes the 'run_debugger_mode' tool definition.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        {
          name: 'navigate',
          description: 'Navigate to a URL',
          inputSchema: {
            type: 'object',
            properties: {
              url: {
                type: 'string',
                description: 'The URL to navigate to',
              },
            },
            required: ['url'],
          },
        },
        {
          name: 'screenshot',
          description: 'Take a screenshot of the current page',
          inputSchema: {
            type: 'object',
            properties: {
              name: {
                type: 'string',
                description: 'Name for the screenshot file',
                default: 'screenshot.png',
              },
              fullPage: {
                type: 'boolean',
                description: 'Capture full page',
                default: false,
              },
            },
          },
        },
        {
          name: 'click',
          description: 'Click an element on the page',
          inputSchema: {
            type: 'object',
            properties: {
              selector: {
                type: 'string',
                description: 'CSS selector for the element to click',
              },
            },
            required: ['selector'],
          },
        },
        {
          name: 'fill',
          description: 'Fill an input field',
          inputSchema: {
            type: 'object',
            properties: {
              selector: {
                type: 'string',
                description: 'CSS selector for the input field',
              },
              value: {
                type: 'string',
                description: 'Value to fill',
              },
            },
            required: ['selector', 'value'],
          },
        },
        {
          name: 'evaluate',
          description: 'Execute JavaScript in the browser',
          inputSchema: {
            type: 'object',
            properties: {
              script: {
                type: 'string',
                description: 'JavaScript code to execute',
              },
            },
            required: ['script'],
          },
        },
        {
          name: 'get_content',
          description: 'Get page content (HTML or text)',
          inputSchema: {
            type: 'object',
            properties: {
              type: {
                type: 'string',
                enum: ['html', 'text'],
                description: 'Type of content to get',
                default: 'text',
              },
            },
          },
        },
        {
          name: 'hover',
          description: 'Hover over an element on the page',
          inputSchema: {
            type: 'object',
            properties: {
              selector: {
                type: 'string',
                description: 'CSS selector for the element to hover',
              },
            },
            required: ['selector'],
          },
        },
        {
          name: 'select',
          description: 'Select an option from a dropdown',
          inputSchema: {
            type: 'object',
            properties: {
              selector: {
                type: 'string',
                description: 'CSS selector for the select element',
              },
              value: {
                type: 'string',
                description: 'Value to select',
              },
            },
            required: ['selector', 'value'],
          },
        },
        {
          name: 'get_console_logs',
          description: 'Get browser console logs',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'get_console_errors',
          description: 'Get browser console errors',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'get_network_logs',
          description: 'Get network activity logs',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'get_network_errors',
          description: 'Get network error logs',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'wipe_logs',
          description: 'Clear all stored logs from memory',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'get_selected_element',
          description: 'Get information about the currently selected element',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'run_accessibility_audit',
          description: 'Run an accessibility audit on the current page',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'run_performance_audit',
          description: 'Run a performance audit on the current page',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'run_seo_audit',
          description: 'Run an SEO audit on the current page',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'run_best_practices_audit',
          description: 'Run a best practices audit on the current page',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'run_nextjs_audit',
          description: 'Run a Next.js specific audit on the current page',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'run_debugger_mode',
          description: 'Run debugger mode to debug issues in the application',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'run_audit_mode',
          description: 'Run comprehensive audit mode for optimization',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
        {
          name: 'close_browser',
          description: 'Close the browser instance',
          inputSchema: {
            type: 'object',
            properties: {},
          },
        },
      ],
    }));
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool runs a debugger mode but does not disclose behavioral traits such as whether it's interactive, what output it produces, if it modifies the application state, or its execution duration. This leaves significant gaps for a tool that likely involves runtime analysis.

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 a single, efficient sentence with no wasted words. It is appropriately sized for a simple tool, though it could be more front-loaded with key details if the purpose were clearer.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity implied by 'debugger mode' and the lack of annotations and output schema, the description is incomplete. It does not explain what the tool does beyond the name, what issues it debugs, or what results to expect, making it inadequate for informed tool selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description does not add parameter details, but this is acceptable given the absence of parameters, aligning with the baseline for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as 'Run debugger mode to debug issues in the application', which is clear but vague. It specifies the verb 'run' and resource 'debugger mode', but lacks specificity about what 'debugger mode' entails or how it differs from sibling audit tools like 'run_audit_mode' or 'run_accessibility_audit'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites, context, or exclusions, leaving the agent to infer usage from the name alone among many sibling tools focused on testing, debugging, and interaction.

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/nfodor/claude-arm64-browser'

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