Skip to main content
Glama
code-alchemist01

Development Tools MCP Server

screenshot_page

Capture web page screenshots for documentation, testing, or visual reference by providing a URL, with options for full-page capture and element waiting.

Instructions

Take a screenshot of a web page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to screenshot
fullPageNoCapture full page
waitForSelectorNoCSS selector to wait for before screenshot

Implementation Reference

  • Core implementation of screenshotPage using Playwright: launches browser, navigates to URL, waits for selector if provided, takes screenshot, returns Buffer.
    async screenshotPage(config: ScrapingConfig, options?: { fullPage?: boolean; path?: string }): Promise<Buffer> {
      const browser = await this.getBrowser();
      const page = await browser.newPage();
    
      try {
        await page.goto(config.url, {
          waitUntil: 'networkidle',
          timeout: config.timeout || 30000,
        });
    
        if (config.waitForSelector) {
          await page.waitForSelector(config.waitForSelector);
        }
    
        const screenshot = await page.screenshot({
          fullPage: options?.fullPage || false,
          path: options?.path,
        });
    
        return screenshot as Buffer;
      } finally {
        await page.close();
      }
    }
  • MCP tool handler switch case for 'screenshot_page': calls DynamicScraper.screenshotPage and returns base64-encoded PNG.
    case 'screenshot_page': {
      const screenshot = await dynamicScraper.screenshotPage(config, {
        fullPage: params.fullPage as boolean,
      });
      return {
        screenshot: screenshot.toString('base64'),
        format: 'png',
        message: 'Screenshot taken successfully',
      };
    }
  • Registers the 'screenshot_page' tool in webScrapingTools array, including description and input schema.
    {
      name: 'screenshot_page',
      description: 'Take a screenshot of a web page',
      inputSchema: {
        type: 'object',
        properties: {
          url: {
            type: 'string',
            description: 'URL to screenshot',
          },
          fullPage: {
            type: 'boolean',
            description: 'Capture full page',
            default: false,
          },
          waitForSelector: {
            type: 'string',
            description: 'CSS selector to wait for before screenshot',
          },
        },
        required: ['url'],
      },
    },
  • Input schema for the screenshot_page tool defining parameters: url (required), fullPage, waitForSelector.
      inputSchema: {
        type: 'object',
        properties: {
          url: {
            type: 'string',
            description: 'URL to screenshot',
          },
          fullPage: {
            type: 'boolean',
            description: 'Capture full page',
            default: false,
          },
          waitForSelector: {
            type: 'string',
            description: 'CSS selector to wait for before screenshot',
          },
        },
        required: ['url'],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Take a screenshot' implies a read-only operation that captures visual output, but it doesn't mention critical behaviors like whether it requires network access, handles dynamic content, returns an image file or data, or has any rate limits or permissions needed.

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 resource, making it easy to scan and understand immediately.

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 the tool's complexity (capturing web content with parameters for full-page and waiting), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., image data, file path, error handling) or behavioral constraints, leaving significant gaps for an agent to use it correctly.

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 the three parameters (url, fullPage, waitForSelector). The description adds no additional meaning about parameters beyond implying a 'web page' context for the URL, which aligns with the schema. 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 'Take a screenshot of a web page' clearly states the verb ('Take') and resource ('a screenshot of a web page'), making the purpose immediately understandable. However, it doesn't differentiate from potential sibling tools like 'extract_images' or 'scrape_html' that might also capture visual content, which prevents a perfect 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. With many sibling tools focused on analysis, extraction, and scraping, there's no indication of whether this is for visual capture versus content extraction, or any prerequisites like needing a live webpage.

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/code-alchemist01/development-tools-mcp-Server'

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