Skip to main content
Glama

screenshot

Capture web page screenshots using the MCP Browser Server. Save specific sections or full scrollable pages, with optional custom save paths for efficient web automation and documentation.

Instructions

Take a screenshot of the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullPageNoCapture full scrollable page
pathNoPath to save screenshot (optional)

Implementation Reference

  • Handler for the 'screenshot' tool. Validates input using ScreenshotSchema, captures screenshot of current page using Playwright's page.screenshot() with options fullPage and path, returns textual confirmation with buffer size or save path.
    case 'screenshot': {
      if (!currentPage) {
        throw new Error('No browser page available. Launch a browser first.');
      }
    
      const params = ScreenshotSchema.parse(args);
      const buffer = await currentPage.screenshot({
        fullPage: params.fullPage,
        path: params.path
      });
    
      const result = params.path 
        ? `Screenshot saved to: ${params.path}`
        : `Screenshot captured (${buffer.length} bytes)`;
    
      return {
        content: [
          {
            type: 'text',
            text: result
          }
        ]
      };
    }
  • Zod schema for screenshot tool inputs: fullPage (boolean, optional, defaults to false), path (string, optional).
    const ScreenshotSchema = z.object({
      fullPage: z.boolean().default(false),
      path: z.string().optional()
    });
  • src/index.ts:220-235 (registration)
    Tool registration in ListTools response: defines name 'screenshot', description, and inputSchema matching ScreenshotSchema.
    name: 'screenshot',
    description: 'Take a screenshot of the current page',
    inputSchema: {
      type: 'object',
      properties: {
        fullPage: {
          type: 'boolean',
          default: false,
          description: 'Capture full scrollable page'
        },
        path: {
          type: 'string',
          description: 'Path to save screenshot (optional)'
        }
      }
    }
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 offers minimal behavioral insight. It states the basic action but doesn't disclose critical details like whether it requires browser context, if it saves automatically or requires a path, error handling, or performance implications. This leaves significant gaps for agent decision-making.

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 wasted words. It's front-loaded with the core action and resource, making it highly efficient and easy to parse.

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?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., image data, file path, success status) or address behavioral aspects like dependencies on browser state. Given the complexity of screenshot operations, more context is needed.

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 parameters are well-documented in the schema itself. The description adds no additional parameter semantics beyond implying 'current page' as the target. This meets the baseline for high schema coverage but doesn't enhance understanding.

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 resource ('current page'), making the purpose immediately understandable. However, it doesn't distinguish this from potential sibling tools like 'analyze_screenshot' or 'get_page_info', which might offer overlapping functionality.

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. For example, it doesn't mention when to prefer 'screenshot' over 'get_page_info' for visual capture or how it relates to 'analyze_screenshot' for post-processing. There's no context about prerequisites or exclusions.

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

Related 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/Wladastic/mcp-browser-server'

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