Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

screenshot

Capture and save screenshots of web pages directly from the Chromium ARM64 Browser. Define file names and choose between full-page or viewport captures for precise documentation and testing.

Instructions

Take a screenshot of the current page

Input Schema

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

Implementation Reference

  • Core handler for the 'screenshot' MCP tool. Uses Chrome DevTools Protocol (CDP) to capture page screenshot, supports full-page mode by clipping to content size, decodes base64 PNG and saves to /tmp/{name}, returns path.
    async screenshot(name, fullPage) { await this.ensureChromium(); const screenshotParams = { format: 'png' }; if (fullPage) { const metrics = await this.sendCDPCommand('Page.getLayoutMetrics'); screenshotParams.clip = { x: 0, y: 0, width: metrics.contentSize.width, height: metrics.contentSize.height, scale: 1 }; } const result = await this.sendCDPCommand('Page.captureScreenshot', screenshotParams); const screenshotPath = `/tmp/${name}`; fs.writeFileSync(screenshotPath, result.data, 'base64'); return { content: [{ type: 'text', text: `Screenshot saved to ${screenshotPath}` }], }; }
  • JSON schema definition for the screenshot tool's input parameters in the listTools response.
    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, }, }, }, },
  • index.js:355-356 (registration)
    Tool dispatch/registration in the CallToolRequestSchema switch statement, mapping 'screenshot' calls to the handler method.
    case 'click': return await this.click(args.selector);
  • Python helper wrapper that invokes the MCP 'screenshot' tool via subprocess JSON-RPC call to index.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