Skip to main content
Glama
Decodo

Decodo MCP Server

screenshot

Read-only

Capture a screenshot of any webpage as a PNG image. Specify the URL and optionally set a geographic location to tailor the content.

Instructions

Capture a screenshot of any webpage and return it as a PNG image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to screenshot
geoNoGeolocation of the desired request, expressed as a country name

Implementation Reference

  • The handler function for the screenshot tool: calls sapiClient.scrape with headless:'png' and returns the result as a PNG image in MCP content format.
    async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
      const { data } = await sapiClient.scrape({
        auth,
        scrapingParams: { ...scrapingParams, headless: 'png' },
        extra,
      });
    
      return {
        content: [
          {
            type: 'image' as const,
            data: data as string,
            mimeType: 'image/png',
          },
        ],
      };
    }
  • Registers the tool named 'screenshot' with the MCP server, providing description, inputSchema (url + geo), annotations, and the handler callback.
    register = ({ server, sapiClient, auth }: ToolRegistrationArgs) => {
      server.registerTool(
        'screenshot',
        {
          description: 'Capture a screenshot of any webpage and return it as a PNG image',
          inputSchema: {
            url: z.string().describe('URL to screenshot'),
            geo: zodGeo,
          },
          annotations: {
            readOnlyHint: true,
            openWorldHint: true,
          },
        },
        async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
          const { data } = await sapiClient.scrape({
            auth,
            scrapingParams: { ...scrapingParams, headless: 'png' },
            extra,
          });
    
          return {
            content: [
              {
                type: 'image' as const,
                data: data as string,
                mimeType: 'image/png',
              },
            ],
          };
        }
      );
    };
  • Input schema for the screenshot tool: requires a 'url' string and optional 'geo' geolocation field.
    inputSchema: {
      url: z.string().describe('URL to screenshot'),
      geo: zodGeo,
  • Definition of the zodGeo schema used by the screenshot tool's input schema.
    export const zodGeo = z
      .string()
      .describe('Geolocation of the desired request, expressed as a country name')
      .optional();
    
    export const zodLocale = z.string().describe('Locale of the desired request').optional();
  • Instantiation of ScreenshotTool in the allTools array, which gets registered via registerAllTools() or registerTools().
    new ScreenshotTool(),
Behavior3/5

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

Annotations already provide readOnlyHint and openWorldHint, covering read-only and external access. The description adds that the output is a PNG image but does not disclose potential behaviors like rendering JavaScript, page load time, or viewport settings.

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?

Single sentence, no extraneous words. All information is front-loaded and actionable.

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

Completeness4/5

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

Given the simple tool (screenshot) with well-described parameters and annotations, the description is largely sufficient. It mentions the output format. Minor gap: no mention of viewport size or full-page capture, but not critical for basic use.

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 has 100% coverage with clear descriptions for both 'url' and 'geo'. The description does not provide additional meaning beyond the schema, so score is baseline 3.

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?

Description clearly states the action ('capture a screenshot'), the resource ('any webpage'), and the output format ('PNG image'). It is distinct from sibling tools which focus on text or data extraction.

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 explicit guidance on when to use this tool versus alternatives like scrape_as_markdown or google_lens. The description implies use for visual captures but does not state limitations or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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