Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

screenshot

Capture webpage screenshots for documentation, testing, or debugging using the Chromium ARM64 Browser MCP server. Save screenshots as PNG files with options for full-page capture.

Instructions

Take a screenshot of the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName for the screenshot filescreenshot.png
fullPageNoCapture full page

Implementation Reference

  • Main handler function for the 'screenshot' tool. Uses CDP to capture screenshot (full page optional) and saves PNG to /tmp/{name}.
    async screenshot(name = 'screenshot.png', fullPage = false) { await this.ensureChromium(); const screenshotParams = { format: 'png' }; if (fullPage) { const metrics = await this.sendCDPCommand('Page.getLayoutMetrics'); await this.sendCDPCommand('Emulation.setDeviceMetricsOverride', { width: metrics.contentSize.width, height: metrics.contentSize.height, deviceScaleFactor: 1, mobile: false, }); screenshotParams.clip = { x: 0, y: 0, width: metrics.contentSize.width, height: metrics.contentSize.height, scale: 1, }; } const screenshot = await this.sendCDPCommand('Page.captureScreenshot', screenshotParams); const screenshotPath = `/tmp/${name}`; fs.writeFileSync(screenshotPath, screenshot.data, 'base64'); return { content: [{ type: 'text', text: `Screenshot saved to ${screenshotPath}` }], }; }
  • Input schema definition for the screenshot tool, specifying parameters 'name' and 'fullPage'.
    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, }, }, }, },
  • Registration/dispatch in the CallToolRequestSchema handler: maps 'screenshot' tool calls to the screenshot handler method.
    case 'screenshot': return await this.screenshot(args.name, args.fullPage);
  • Python helper wrapper that invokes the MCP 'screenshot' tool via subprocess on the JS server.
    def arm64_browser_screenshot(name: str = "screenshot.png", full_page: bool = False) -> str: """Take a screenshot using ARM64 Chromium browser. Args: name: Filename for the screenshot full_page: Whether to capture the full page Returns: Path to screenshot file or error message """ request = { "jsonrpc": "2.0", "method": "tools/call", "params": {"name": "screenshot", "arguments": {"name": name, "fullPage": full_page}}, "id": 1 } try: result = subprocess.run( ["node", INDEX_PATH], input=json.dumps(request), text=True, capture_output=True, timeout=30, cwd=SERVER_DIR ) # Parse both stdout and stderr for JSON responses all_output = result.stdout + result.stderr lines = [line for line in all_output.strip().split('\n') if line.startswith('{"')] for line in lines: try: response = json.loads(line) if 'result' in response: content = response.get('result', {}).get('content', [{}]) return content[0].get('text', f'Screenshot saved as {name}') except json.JSONDecodeError: continue return f"No valid response found. Output: {all_output[:200]}" except Exception as e: return f"Screenshot error: {e}"

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