Skip to main content
Glama
DumplingAI

Dumpling AI MCP Server

Official
by DumplingAI

screenshot

Capture web page screenshots with customizable viewport dimensions, image formats, and capture settings for documentation or analysis.

Instructions

Capture screenshots of web pages with customizable settings.

Input Schema

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

Implementation Reference

  • The handler function executes the screenshot tool by sending a POST request to the DumplingAI API endpoint `/api/v1/screenshot` with the provided parameters and returns the JSON response.
    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 URL, dimensions, format options, and other screenshot settings.
    {
      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-518 (registration)
    The server.tool call that registers the "screenshot" tool with its description, input schema, and handler function.
    // Tool to capture screenshots
    server.tool(
      "screenshot",
      "Capture screenshots of web pages with customizable settings.",
      {
        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"),
      },
      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) }] };
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'customizable settings' but doesn't describe key behaviors: whether this is a read-only operation, what happens on errors (e.g., invalid URLs), performance characteristics (e.g., timeouts), or output format (e.g., image bytes, file path). For a tool with 12 parameters and no annotation coverage, this is insufficient.

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, efficient sentence: 'Capture screenshots of web pages with customizable settings.' It's front-loaded with the core purpose and wastes no words. Every part earns its place by conveying essential information concisely.

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 (12 parameters, nested objects) and lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects (e.g., what the tool returns, error handling), usage context, or how parameters work together. For a sophisticated screenshot tool, this leaves significant gaps for an AI agent.

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 all 12 parameters thoroughly. The description adds minimal value beyond the schema by hinting at 'customizable settings', but doesn't explain parameter interactions (e.g., how 'clipRectangle' relates to 'fullPage') or provide 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 tool's purpose: 'Capture screenshots of web pages with customizable settings.' It specifies the verb ('capture'), resource ('screenshots of web pages'), and scope ('customizable settings'). However, it doesn't explicitly differentiate from sibling tools like 'scrape' or 'extract-image', which might have 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. It doesn't mention prerequisites (e.g., internet access), exclusions (e.g., not for non-web content), or compare it to siblings like 'scrape' (which might extract text) or 'extract-image' (which might extract existing images).

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

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