Skip to main content
Glama
BrowserGenie

BrowserGenie MCP Server

by BrowserGenie

screenshot_full_page

Capture the entire webpage, including off-screen content, by automatically scrolling and stitching screenshots together.

Instructions

Take a screenshot of the ENTIRE page, including content you need to scroll down to see. Automatically scrolls and stitches images together. Use this when you need to see everything on the page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoImage format: png (default, lossless) or jpeg (smaller file size)
qualityNoJPEG quality 0-100 (higher = better quality, larger file)
tabIdNoTarget tab ID (defaults to currently active tab)
apiKeyNoAPI key for authentication if enabled

Implementation Reference

  • The handler function for the 'screenshot_full_page' MCP tool. It sends a 'screenshot_full_page' command via WebSocket bridge with optional format/quality params, handles errors, and returns an image content response.
    server.tool(
      'screenshot_full_page',
      'Take a screenshot of the ENTIRE page, including content you need to scroll down to see. Automatically scrolls and stitches images together. Use this when you need to see everything on the page.',
      {
        format: z.enum(['png', 'jpeg']).optional().describe('Image format: png (default, lossless) or jpeg (smaller file size)'),
        quality: z.number().min(0).max(100).optional().describe('JPEG quality 0-100 (higher = better quality, larger file)'),
        tabId: z.number().optional().describe('Target tab ID (defaults to currently active tab)'),
        apiKey: z.string().optional().describe('API key for authentication if enabled'),
      },
      async ({ format, quality, tabId, apiKey }) => {
        const result = await bridge.sendCommand({
          command: 'screenshot_full_page',
          params: { format, quality },
          tabId,
          apiKey,
          timeout: LONG_TIMEOUT,
        });
        if (!result.success) {
          return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
        }
        const data = result.data as { image: string; mimeType: string };
        return {
          content: [{
            type: 'image',
            data: data.image,
            mimeType: data.mimeType,
          }],
        };
      }
    );
  • Input schema/validation for the screenshot_full_page tool using Zod. Defines optional parameters: format (png/jpeg), quality (0-100), tabId (number), and apiKey (string).
    {
      format: z.enum(['png', 'jpeg']).optional().describe('Image format: png (default, lossless) or jpeg (smaller file size)'),
      quality: z.number().min(0).max(100).optional().describe('JPEG quality 0-100 (higher = better quality, larger file)'),
      tabId: z.number().optional().describe('Target tab ID (defaults to currently active tab)'),
      apiKey: z.string().optional().describe('API key for authentication if enabled'),
    },
  • The tool is registered via registerScreenshotTools called from registerAllTools in src/tools/index.ts.
    registerScreenshotTools(server, bridge);
  • src/server.ts:11-11 (registration)
    The createServer function calls registerAllTools to register all tools including screenshot_full_page on the MCP server.
    registerAllTools(server, bridge);
  • The WebSocketBridge.sendCommand helper used to relay the 'screenshot_full_page' command to the Chrome extension via WebSocket.
    async sendCommand(cmd: BridgeCommand): Promise<BridgeResponse> {
      if (!this.isConnected()) {
        return {
          success: false,
          error: {
            code: 'NOT_CONNECTED',
            message: 'Chrome extension is not connected. Ensure the extension is installed, enabled, and the browser is running.',
          },
        };
      }
    
      const id = crypto.randomUUID();
      const timeout = cmd.timeout ?? DEFAULT_TIMEOUT;
    
      return new Promise<BridgeResponse>((resolve, reject) => {
        const timer = setTimeout(() => {
          this.pending.delete(id);
          resolve({
            success: false,
            error: {
              code: 'TIMEOUT',
              message: `Command '${cmd.command}' timed out after ${timeout}ms`,
            },
          });
        }, timeout);
    
        this.pending.set(id, { resolve, reject, timer });
    
        const message = {
          id,
          type: 'request',
          command: cmd.command,
          params: cmd.params,
          tabId: cmd.tabId,
          apiKey: cmd.apiKey,
          timestamp: Date.now(),
        };
    
        this.client!.send(JSON.stringify(message));
      });
    }
Behavior4/5

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

No annotations are provided, so the description must disclose behavioral traits. It explains the tool 'Automatically scrolls and stitches images together,' which is key behavior. It does not mention limitations or side effects like performance impact, but this is sufficient for the tool's complexity.

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 extremely concise with only two sentences, front-loading the main action and purpose. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 optional parameters, no output schema, and no annotations, the description covers the core functionality and when to use it. It could mention output format or that the image is returned, but the tool is simple and the description is adequate.

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 coverage is 100% with all parameters described in the input schema. The description does not add additional meaning beyond the schema's parameter descriptions. According to guidelines, baseline is 3 when coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool captures the entire page, including off-screen content, with specific verb 'Take a screenshot' and resource 'ENTIRE page'. It distinguishes from sibling tools like screenshot_element and screenshot_viewport by emphasizing full-page capture.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes 'Use this when you need to see everything on the page,' providing clear usage context. However, it lacks explicit exclusion for cases where only visible or element screenshots are needed, though this is implied given sibling tool names.

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/BrowserGenie/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server