Skip to main content
Glama

Capture Screen

capture_screen
Read-onlyIdempotent

Capture a frame from a USB webcam aimed at a Meshtastic device screen and optionally extract visible text with OCR for remote UI inspection.

Instructions

Grab a frame from the USB webcam pointed at the device screen.

Returns {backend, bytes, image_base64, ocr_backend?, ocr_text?}: PNG bytes (base64), optional OCR text, and backend metadata. Requires the [ui] extras (opencv-python-headless) and a camera configured via MESHTASTIC_UI_CAMERA_DEVICE[_<ROLE>]. Falls back to a 1×1 black PNG from the null backend when no camera is configured. The screen can show mesh-sourced text.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "capture_screen"
  }
}

Input Schema

NameRequiredDescriptionDefault
ocrNoAlso run OCR on the frame.
roleNoWhich camera, picking `MESHTASTIC_UI_CAMERA_DEVICE_<ROLE>`; omit for the default one.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), so the description's added value is the silent-failure behavior: it "falls back to a 1x1 black PNG from the null backend when no camera is configured," which an agent must know to avoid mistaking a placeholder for a real frame. It also discloses the dependency set (opencv-python-headless) needed for the call to work at all.

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?

The action is front-loaded in the first sentence and each subsequent sentence carries real information about returns, dependencies, and fallback. The return-shape sentence partially duplicates the existing output schema, which is the only clearly non-earning content.

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?

For a two-parameter, zero-required capture tool with full schema coverage, an output schema, and rich annotations, the description covers the operational essentials: what is captured, what comes back, what must be configured, and what happens on misconfiguration. It is only short of routing guidance relative to sibling capture tools.

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%, and the schema itself documents both `ocr` and `role` including the role-to-environment-variable mapping. The description adds nothing about either parameter, so the baseline of 3 applies.

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 states a specific verb and resource: "Grab a frame from the USB webcam pointed at the device screen," which tells an agent exactly what hardware path is involved. It does not differentiate itself from the sibling capture_display, so an agent has no in-definition signal for choosing between the two screen-capture tools.

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

Usage Guidelines3/5

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

Usage is only implied: you call it when you want an image of the device screen. The description does supply prerequisites ([ui] extras, MESHTASTIC_UI_CAMERA_DEVICE configuration), which helps an agent predict failure, but it never states when to prefer this over capture_display or inject_frame.

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