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
| Name | Required | Description | Default |
|---|---|---|---|
| boxes | Yes | JSON 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_key | No | MCP API key | |
| vm_name | Yes | VM 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_perf | No | Include per-stage timing metrics in the response. | |
| session_token | No | Session token |