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}"
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits. It doesn't mention what happens after capture (e.g., file saved locally/remotely, format constraints), permissions needed, or side effects like pausing page interaction during capture.

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 a single, efficient sentence with zero wasted words. It's front-loaded with the core action and appropriately sized for a straightforward tool, earning full marks for conciseness.

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 no annotations and no output schema, the description is incomplete for a tool that performs a visual capture operation. It lacks details on return values (e.g., file path, success confirmation), error conditions, or dependencies like requiring an active browser context, leaving significant gaps for agent usage.

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?

Schema description coverage is 100%, so the schema fully documents both parameters (name and fullPage). The description adds no additional parameter meaning beyond implying a screenshot is taken, which is already covered by the tool name and purpose. This meets the baseline for high schema coverage.

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 ('Take a screenshot') and target resource ('of the current page'), making the purpose immediately understandable. However, it doesn't differentiate from potential sibling tools like 'get_content' or 'run_audit_mode' that might also capture visual information, so it doesn't reach the highest score.

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 a browser session open), exclusions, or comparisons to sibling tools like 'get_content' for text extraction or audit tools for visual analysis.

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