Skip to main content
Glama

screenshot

Capture screenshots of web pages with optional full-page scroll and custom save paths.

Instructions

Take a screenshot of the current page

Input Schema

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

Implementation Reference

  • Zod schema for the screenshot tool: defines input parameters (fullPage boolean default false, optional path string).
    const ScreenshotSchema = z.object({
      fullPage: z.boolean().default(false),
      path: z.string().optional()
    });
  • src/index.ts:219-236 (registration)
    Tool registration in the ListToolsRequestSchema handler, defines name 'screenshot', description, and inputSchema (fullPage boolean, path string).
    {
      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)'
          }
        }
      }
    },
  • Handler implementation for the 'screenshot' tool. Parses input via ScreenshotSchema, calls currentPage.screenshot() via Playwright, and returns a text result indicating either the save path or the buffer size.
    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
          }
        ]
      };
    }
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only states the basic action without mentioning side effects, output format, or that it is a read-only operation. Important traits like whether fullPage screenshots scroll the page are omitted.

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?

A single sentence that is direct and without unnecessary words. It earns its place by conveying the core purpose efficiently.

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

Completeness3/5

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

Given 2 optional parameters and no output schema, the description is minimal. It does not explain return values, the effect of fullPage, or path behavior (e.g., where saved if omitted). More details would improve completeness.

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?

Input schema coverage is 100% with both parameters described (fullPage and path). The description adds no extra meaning beyond what the schema provides, so baseline score of 3 is appropriate.

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 action ('Take a screenshot') and the target ('of the current page'). It is a specific verb+resource pairing that distinguishes from sibling tools like analyze_screenshot or check_scrollability.

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?

No guidance is provided on when to use this tool versus alternatives (e.g., analyze_screenshot for analyzing an existing screenshot, or check_scrollability to decide fullPage usage). The description lacks context on prerequisites or typical workflow.

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

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