Skip to main content
Glama
epi-builder
by epi-builder

browser_take_screenshot

Capture screenshots of web pages using Playwright browser automation. Save images with custom filenames and choose between viewport or full-page captures.

Instructions

Take a screenshot of the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameNoFile name to save the screenshot to
fullPageNoTake screenshot of full page

Implementation Reference

  • The handler function that executes the browser_take_screenshot tool. It ensures a browser and page are available, saves a screenshot to the specified filename (or a timestamped default), optionally full page, and returns a success message.
    private async handleScreenshot(filename?: string, fullPage?: boolean) {
      await this.ensureBrowser();
      
      const screenshotPath = filename || `screenshot-${Date.now()}.png`;
      await this.browserState.page!.screenshot({
        path: screenshotPath,
        fullPage: fullPage || false,
      });
      
      return {
        content: [
          {
            type: 'text',
            text: `Screenshot saved to ${screenshotPath}`,
          },
        ],
      };
    }
  • The tool schema definition returned by listTools, including name, description, and inputSchema for filename (optional string) and fullPage (optional boolean).
    {
      name: 'browser_take_screenshot',
      description: 'Take a screenshot of the current page',
      inputSchema: {
        type: 'object',
        properties: {
          filename: {
            type: 'string',
            description: 'File name to save the screenshot to',
          },
          fullPage: {
            type: 'boolean',
            description: 'Take screenshot of full page',
          },
        },
      },
    },
  • src/server.ts:169-171 (registration)
    The switch case registration that maps the tool name to its handler function in the CallToolRequest handler.
    case 'browser_take_screenshot':
      return await this.handleScreenshot(args?.filename as string | undefined, args?.fullPage as boolean | undefined);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but doesn't mention critical details like whether this requires specific permissions, how it handles errors, what format the screenshot is saved in, or where it's stored. For a tool with potential side effects, this is inadequate.

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, clear sentence with zero waste. It's appropriately sized for a simple tool and front-loaded with the core action, making it easy to parse quickly.

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 (a screenshot operation with potential side effects), no annotations, and no output schema, the description is insufficient. It doesn't explain what happens after the screenshot is taken (e.g., file saved location, return value), leaving critical 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 already documents both parameters ('filename' and 'fullPage'). The description adds no additional meaning beyond what the schema provides, such as explaining default behaviors or usage examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('current page'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from the sibling 'browser_snapshot', which might have overlapping functionality, preventing 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 like 'browser_snapshot' or other browser tools. It lacks context about prerequisites (e.g., requiring an open browser page) or exclusions, offering only a basic statement of functionality.

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/epi-builder/mcp-test'

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