Skip to main content
Glama

screenshot

Capture screenshots of web pages to document or analyze content. Specify a URL to generate full-page or partial screenshots for visual reference.

Instructions

Capture a screenshot of a URL. Costs 2 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to screenshot
full_pageNoCapture full page (default: true)

Implementation Reference

  • src/index.ts:132-140 (registration)
    Tool registration for 'screenshot' - registers the screenshot tool with the MCP server, defining its name, description, input schema (url and full_page parameters), and handler function
    server.tool(
      "screenshot",
      "Capture a screenshot of a URL. Costs 2 credits.",
      {
        url: z.string().describe("URL to screenshot"),
        full_page: z.boolean().optional().default(true).describe("Capture full page (default: true)"),
      },
      async ({ url, full_page }) => jsonResult(await apiPost("/screenshot", { url, full_page }))
    );
  • Handler function for screenshot tool - async arrow function that calls apiPost('/screenshot', { url, full_page }) and returns the JSON-formatted result
    async ({ url, full_page }) => jsonResult(await apiPost("/screenshot", { url, full_page }))
  • Input schema for screenshot tool using Zod - defines 'url' as required string and 'full_page' as optional boolean with default true
    {
      url: z.string().describe("URL to screenshot"),
      full_page: z.boolean().optional().default(true).describe("Capture full page (default: true)"),
    },
  • apiPost helper function - makes POST requests to the SearchClaw API with timeout handling and error management, used by screenshot tool to call the /screenshot endpoint
    async function apiPost(path: string, body: Record<string, unknown>) {
      const controller = new AbortController();
      const timeout = setTimeout(() => controller.abort(), 30000);
      try {
        const response = await fetch(`${API_BASE}${path}`, {
          method: "POST",
          headers: { ...headers, "Content-Type": "application/json" },
          body: JSON.stringify(body),
          signal: controller.signal,
        });
        if (!response.ok) {
          const text = await response.text();
          throw new Error(`SearchClaw API error ${response.status}: ${text}`);
        }
        return response.json();
      } finally {
        clearTimeout(timeout);
      }
    }
  • jsonResult helper function - formats API response data into MCP tool result format with text content type
    function jsonResult(data: unknown) {
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the cost implication ('Costs 2 credits'), which is valuable operational context. However, it doesn't describe what happens on failure, whether authentication is needed, rate limits, or what format the screenshot is returned in (though there's no output schema).

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 extremely concise with just two sentences that each serve a clear purpose: stating the tool's function and disclosing cost implications. There's zero wasted language, and it's front-loaded with the core functionality.

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?

For a tool with 2 parameters, 100% schema coverage, and no output schema, the description provides basic operational context (cost) but lacks information about return format, error conditions, or performance characteristics. Given the mutation nature of creating a screenshot and no annotations, more behavioral context would be helpful.

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 fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema. The baseline score of 3 is appropriate when the schema does all the parameter documentation work.

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 specific action ('Capture a screenshot') and resource ('of a URL'), with no ambiguity. It distinguishes itself from sibling tools like 'browse' or 'images' by focusing specifically on screenshot capture 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 like 'browse' or 'images' from the sibling list. It mentions a cost ('Costs 2 credits') which could imply usage constraints, but doesn't specify when this tool is preferred over other methods of obtaining visual content.

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/CSteenkamp/searchclaw-mcp'

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