Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

evaluate

Execute JavaScript code directly in the Chromium browser on ARM64 devices to automate tasks, test web applications, and interact with page elements programmatically.

Instructions

Execute JavaScript in the browser

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript code to execute

Implementation Reference

  • The primary handler function for the 'evaluate' MCP tool. It ensures the Chromium browser is running, executes the provided JavaScript script using the CDP Runtime.evaluate command, and returns the result formatted as MCP content.
    async evaluate(script) {
      await this.ensureChromium();
      const result = await this.sendCDPCommand('Runtime.evaluate', {
        expression: script,
        returnByValue: true
      });
      
      return {
        content: [{ type: 'text', text: `Result: ${JSON.stringify(result.result?.value)}` }],
      };
    }
  • Input schema definition for the 'evaluate' tool used in tool listing and validation.
      name: 'evaluate',
      description: 'Execute JavaScript in the browser',
      inputSchema: {
        type: 'object',
        properties: {
          script: {
            type: 'string',
            description: 'JavaScript code to execute',
          },
        },
        required: ['script'],
      },
    },
  • Alternative handler function for the 'evaluate' tool in the browser-only MCP server implementation.
    async evaluate(script) {
      await this.ensureChromium();
      
      const result = await this.sendCDPCommand('Runtime.evaluate', {
        expression: script,
        returnByValue: true,
      });
      
      return {
        content: [{ type: 'text', text: `Result: ${JSON.stringify(result.result.value)}` }],
      };
    }
  • Input schema for the 'evaluate' tool in the browser-only server.
      name: 'evaluate',
      description: 'Execute JavaScript in the browser (read-only operations)',
      inputSchema: {
        type: 'object',
        properties: {
          script: {
            type: 'string',
            description: 'JavaScript code to execute (for reading page info)',
          },
        },
        required: ['script'],
      },
    },
  • index.js:359-360 (registration)
    Dispatch registration for the 'evaluate' tool within the CallToolRequestSchema switch statement.
    case 'evaluate':
      return await this.evaluate(args.script);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but lacks critical details: it doesn't specify execution context (e.g., current page, isolated environment), error handling, security implications, or what happens to the browser state after execution. For a tool that executes arbitrary code, this is a significant gap.

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 extremely concise - a single four-word phrase that directly communicates the core functionality. Every word earns its place with no redundancy or unnecessary elaboration.

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 of executing JavaScript in a browser (with security implications, state changes, and potential side effects), no annotations, no output schema, and a minimal description, this is inadequate. The description doesn't explain return values, error conditions, or what constitutes successful execution, leaving significant gaps for an AI agent.

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?

The schema description coverage is 100%, with the single parameter 'script' clearly documented as 'JavaScript code to execute'. The description adds no additional parameter semantics beyond what the schema provides, but since the schema fully covers the parameter, the baseline score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the action ('Execute JavaScript') and the context ('in the browser'), which distinguishes it from general JavaScript execution tools. However, it doesn't explicitly differentiate from sibling tools like 'get_console_logs' or 'run_audit_mode' that might also involve JavaScript execution in a browser context.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an active browser session), exclusions, or how it differs from sibling tools like 'run_debugger_mode' or 'get_console_errors' that might involve similar browser interactions.

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/mcp-chromium-arm64'

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