Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

screenshot

Capture web page screenshots with customizable viewport settings, full-page option, image format choice, and controlled wait times for precise and detailed captures.

Instructions

Capture screenshots of web pages with customizable settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
autoScrollNoAuto-scroll page
blockCookieBannersNoBlock cookie banners
clipRectangleNoArea to clip
deviceScaleFactorNoDevice scale factor
formatNoImage format
fullPageNoCapture full page
heightNoViewport height
qualityNoImage quality (1-100)
renderJsNoRender JavaScript
urlYesURL to capture
waitNoWait time in ms before capture
widthNoViewport width

Implementation Reference

  • The handler function for the 'screenshot' tool. It validates the API key, constructs a POST request to the external Dumpling AI screenshot endpoint with the provided parameters, handles errors, and returns the JSON response as text content.
    async ({ url, width, height, deviceScaleFactor, fullPage, format, quality, renderJs, wait, clipRectangle, blockCookieBanners, autoScroll, }) => { const apiKey = process.env.DUMPLING_API_KEY; if (!apiKey) throw new Error("DUMPLING_API_KEY not set"); const response = await fetch(`${NWS_API_BASE}/api/v1/screenshot`, { method: "POST", headers: { "Content-Type": "application/json", Authorization: `Bearer ${apiKey}`, }, body: JSON.stringify({ url, width, height, deviceScaleFactor, fullPage, format, quality, renderJs, waitFor: wait, clipRectangle, blockCookieBanners, autoScroll, }), }); if (!response.ok) throw new Error(`Failed: ${response.status} ${await response.text()}`); const data = await response.json(); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; }
  • Zod schema defining the input parameters for the 'screenshot' tool, including required URL and optional screenshot customization options.
    { url: z.string().url().describe("URL to capture"), width: z.number().optional().describe("Viewport width"), height: z.number().optional().describe("Viewport height"), deviceScaleFactor: z.number().optional().describe("Device scale factor"), fullPage: z.boolean().optional().describe("Capture full page"), format: z.enum(["png", "jpeg"]).optional().describe("Image format"), quality: z.number().optional().describe("Image quality (1-100)"), renderJs: z.boolean().optional().describe("Render JavaScript"), wait: z .number() .min(0) .max(5000) .default(0) .describe("Wait time in ms before capture"), clipRectangle: z .object({ top: z.number(), left: z.number(), width: z.number(), height: z.number(), }) .optional() .describe("Area to clip"), blockCookieBanners: z .boolean() .optional() .default(true) .describe("Block cookie banners"), autoScroll: z.boolean().optional().describe("Auto-scroll page"), },
  • src/index.ts:441-444 (registration)
    Registration of the 'screenshot' MCP tool using server.tool(), specifying the tool name and description. The schema and handler follow inline.
    // Tool to capture screenshots server.tool( "screenshot", "Capture screenshots of web pages with customizable settings.",

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/DumplingAI/mcp-server-dumplingai'

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