Skip to main content
Glama

pilot_annotated_screenshot

Take screenshots with visual annotations to identify and label elements for browser automation testing and debugging.

Instructions

Take a screenshot with red overlay boxes and ref labels at each @eN/@cN position. Requires a prior pilot_snapshot call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_pathNoOutput file path for the screenshot

Implementation Reference

  • Handler for the pilot_annotated_screenshot tool, which calls annotateScreenshot and returns the result as an image.
    server.tool(
      'pilot_annotated_screenshot',
      'Take a screenshot with red overlay boxes and ref labels at each @eN/@cN position. Requires a prior pilot_snapshot call.',
      {
        output_path: z.string().optional().describe('Output file path for the screenshot'),
      },
      async ({ output_path }) => {
        await bm.ensureBrowser();
        try {
          const screenshotPath = await annotateScreenshot(bm, output_path);
          bm.resetFailures();
    
          // Read the image and return as base64
          const imageData = fs.readFileSync(screenshotPath);
          const base64 = imageData.toString('base64');
    
          return {
            content: [
              { type: 'text' as const, text: `Annotated screenshot saved: ${screenshotPath}` },
              { type: 'image' as const, data: base64, mimeType: 'image/png' },
            ],
          };
        } catch (err) {
          bm.incrementFailures();
          return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
        }
      }
    );
Behavior3/5

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

No annotations provided, so description carries full disclosure burden. It successfully adds behavioral context about visual output characteristics (red boxes, labels) not inferable from schema, but omits safety info, error conditions if snapshot missing, or file format details.

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?

Two sentences with zero waste. First sentence front-loads unique differentiators (annotation features), second sentence states critical prerequisite. Every word earns its place for a single-parameter tool.

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?

Appropriately complete for a simple single-parameter screenshot tool. Covers core functionality, visual output specifics, and prerequisites. Minor gap: could clarify what '@eN/@cN' notation represents (element/canvas references) for users unfamiliar with pilot_snapshot output.

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 coverage is 100% for the single 'output_path' parameter, which is well-described in the schema. Description implies file creation but does not add parameter syntax, path requirements, or format constraints beyond schema baseline.

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 uses specific verb 'Take' with resource 'screenshot' and clearly distinguishes from sibling 'pilot_screenshot' via unique features: 'red overlay boxes', 'ref labels', and '@eN/@cN position' annotations. The specific formatting details make the scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states prerequisite 'Requires a prior pilot_snapshot call', establishing workflow ordering. However, lacks explicit comparison to 'pilot_screenshot' for when to choose annotated vs standard screenshots.

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/TacosyHorchata/Pilot'

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