Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

evaluate

Execute JavaScript code directly within the Chromium ARM64 Browser to automate testing, manipulate web content, and enhance browser functionality on ARM64 devices like Raspberry Pi.

Instructions

Execute JavaScript in the browser

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript code to execute

Implementation Reference

  • The core handler function for the 'evaluate' tool that executes JavaScript in the browser context using Chrome DevTools Protocol (CDP) Runtime.evaluate and returns the serialized result.
    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)}` }], }; }
  • The input schema and metadata for the 'evaluate' tool, defining the required 'script' parameter.
    { name: 'evaluate', description: 'Execute JavaScript in the browser', inputSchema: { type: 'object', properties: { script: { type: 'string', description: 'JavaScript code to execute', }, }, required: ['script'], }, },
  • index.js:359-360 (registration)
    Registration/dispatch of the 'evaluate' tool handler within the CallToolRequestSchema request handler switch statement.
    case 'evaluate': return await this.evaluate(args.script);
  • Alternative implementation of the evaluate handler in the browser-only variant of the MCP server.
    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)}` }], }; }
  • Dispatch for 'evaluate' tool in the browser-only server.
    case 'evaluate': return await this.evaluate(args.script);

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