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);

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