Skip to main content
Glama

screenshot

Capture a screenshot of the current webpage using AutoProbeMCP. Optional full-page or custom save path support for flexible usage in browser automation tasks.

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 args with ScreenshotSchema, captures screenshot of current page using Playwright (fullPage and path options), returns success message 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, default false), path (optional string to save screenshot).
    const ScreenshotSchema = z.object({ fullPage: z.boolean().default(false), path: z.string().optional() });
  • src/index.ts:219-236 (registration)
    Tool registration in ListToolsResponse: defines name 'screenshot', description, and inputSchema matching the Zod schema.
    { 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)' } } } },

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/AutoProbeMCP'

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