Skip to main content
Glama

OpenFactory

annotate_screenshot

Capture the desktop and draw labeled highlight boxes on it, then return the annotated screenshot URL.

Use this right after writing UI code to visually highlight the element you just added: call desktop_screenshot to read the new element's bbox, then annotate_screenshot with that box (and a label like "new: Submit button"). Coordinates are pixel-space — pass an element's bbox [x1,y1,x2,y2] directly, so the box lands exactly on the element. The annotated image is saved as evidence and returned as a fetchable URL.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "vm_name": "<vm_name>",
      "boxes": "<boxes>"
    },
    "name": "annotate_screenshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
boxesYesJSON array of highlight boxes to draw, in PIXEL coordinates at the screenshot's native resolution. Each box: {"x1":int,"y1":int,"x2":int,"y2":int,"label"?:str,"color"?:"#rrggbb"}. To box a UI element, pass its bbox [x1,y1,x2,y2] straight from a prior desktop_screenshot element. Default color is green (new element); set "color" per box (e.g. "#ef4444" red) to distinguish. Example: [{"x1":100,"y1":120,"x2":360,"y2":180,"label":"new: Submit button"}]
api_keyNoMCP API key
vm_nameYesVM to drive. For a graph launch use its returned of-deploy-* vm_name. For image verification use the of-test-* vm_name returned by resume_test_environment or vms[].vm_name / environment.snapshot.vm_name from get_test_results. For app testing use your own of-desktop-* or of-tester-* VM.
include_perfNoInclude per-stage timing metrics in the response.
session_tokenNoSession token

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations supplied the description carries the full load, and it discloses the key behaviors: it captures the live desktop, draws boxes, persists the result as evidence, and returns a fetchable URL. It omits permission or VM-state requirements and any latency/size limits, which leaves some operational uncertainty.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and the return value, then the workflow, then coordinate semantics. Four tight sentences with no filler, though the closing line about the saved evidence URL partially repeats the opening sentence.

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?

No output schema and no annotations, yet the description covers what is produced (URL), where it comes from (desktop capture), and how to supply coordinates. Ancillary parameters like api_key, session_token, and include_perf are handled by the schema, so nothing essential for correct invocation is missing.

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% and the boxes parameter's schema already documents pixel coordinates, the bbox pass-through from desktop_screenshot, default green color, and an example. The description restates the coordinate convention and label style rather than adding new parameter meaning, so baseline 3 applies.

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?

States a specific verb chain and resource: capture the desktop, draw labeled highlight boxes, return the annotated screenshot URL. The output artifact is named explicitly, which cleanly separates it from the raw-capture sibling desktop_screenshot.

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?

Gives an explicit trigger ('right after writing UI code') and a concrete two-step workflow: call desktop_screenshot to read the bbox, then call annotate_screenshot with that box. It does not state when to skip annotation in favor of a plain capture, but the usage context is unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.