Skip to main content
Glama

screenshot

Capture page screenshots during automated web testing to document visual states and verify UI elements.

Instructions

Take a screenshot of the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for the screenshot file (without extension)

Implementation Reference

  • The screenshot method in the BrowserManager class that captures a screenshot of the current page using Puppeteer and saves it to a file with the given name.
    async screenshot(name: string) {
        const page = await this.init();
        const filename = `${name.replace(/[^a-z0-9]/gi, '_').toLowerCase()}.png`;
        const filepath = path.resolve(process.cwd(), filename);
        await page.screenshot({ path: filepath });
        return `Screenshot saved to ${filepath}`;
    }
  • The input schema and metadata definition for the 'screenshot' tool, including name, description, and input parameters.
    {
        name: "screenshot",
        description: "Take a screenshot of the current page",
        inputSchema: {
            type: "object",
            properties: {
                name: { type: "string", description: "Name for the screenshot file (without extension)" },
            },
            required: ["name"],
        },
    },
  • src/index.ts:132-134 (registration)
    The dispatch logic in the CallToolRequestSchema handler that routes 'screenshot' tool calls to the browserManager.screenshot method.
    case "screenshot":
        result = await browserManager.screenshot(String(args?.name));
        break;
Behavior2/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 states the action but doesn't cover aspects like file format (e.g., PNG, JPEG), save location, permissions needed, or error handling. This leaves significant gaps for a tool that performs a system-level operation.

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, clear sentence with zero waste—it directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it highly efficient.

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 (a system operation with potential side effects), lack of annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., file path, success status) or behavioral details like format or errors, leaving critical gaps for agent 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?

The input schema has 100% description coverage, with the 'name' parameter documented as 'Name for the screenshot file (without extension)'. The description adds no additional parameter semantics beyond this, so it meets the baseline for high schema coverage without compensating further.

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 action ('Take a screenshot') and the target ('of the current page'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_text' or 'set_viewport', which might also involve page content manipulation, so it doesn't reach the highest score.

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 'get_text' for text extraction or 'set_viewport' for viewport adjustments. It lacks explicit context, exclusions, or prerequisites, leaving usage decisions to inference.

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/samusilv/qa-agent-mcp'

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