Skip to main content
Glama

Capture Display

capture_display
Destructive

Capture the device's own screen framebuffer to a PNG for visual inspection and debugging, with optional wake to recover timed-out panels.

Instructions

Capture the device's own screen from its framebuffer and write a PNG.

Exact pixels for BaseUI and MUI, color included. Needs firmware with screen-mirror support; older firmware ignores the request and this times out. blank: true almost always means the panel had timed out (screen_on_secs is reported): capture again with wake. Screens can show mesh-sourced text. See docs/display-mirror.md.

Returns {path, bytes, width, height, panel_width, panel_height, scale, format, blank, colorized, screen_on_secs, panel_class, frames, rects}.

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_display"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoSerial port or `tcp://host[:port]`; omit to auto-select the one likely Meshtastic device.
wakeNoAn input event such as `"BACK"`, pressed on this connection just before the frame. The wake is a real key press, so pick one harmless on that screen.
scaleNoEnlarges a small panel, 1-8.
out_pathNoThe file to write, a `.png` inside `MESHTASTIC_MCP_CAPTURE_DIR` (default: the server's working directory); without it each capture overwrites one scratch file per port.
timeout_sNoSeconds to wait for a frame, at most 45.

Output Schema

NameRequiredDescriptionDefault
pathYes
blankYesa single color; almost always the panel had timed out
bytesYesPNG size
rectsYes
scaleYes
widthYesPNG width, after `scale`
formatYes
framesYes
heightYesPNG height, after `scale`
colorizedYes
panel_classYesfrom the handshake, e.g. `EINK`
panel_widthYes
panel_heightYes
screen_on_secsYesthe panel's blank timeout

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the firmware capability requirement, the ~timeout failure mode on old firmware, the meaning of a blank frame and the wake remedy, and the fact that without out_path each capture overwrites one scratch file per port (consistent with destructiveHint=true). Annotations already flag write/open-world behavior, and the description corroborates rather than contradicts them.

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-loads the purpose, then failure modes, then return shape; every sentence carries information. It is dense but not padded, with only the trailing field enumeration being slightly redundant given the output schema.

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?

Covers the operational essentials for a 5-parameter, zero-required tool: firmware prerequisite, timeout, blank/wake recovery, and file output semantics. The only meaningful omission is guidance against the capture_screen sibling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description still adds meaning by linking `blank`/`screen_on_secs` output to the `wake` parameter and by explaining the out_path overwrite fallback. It does not add syntax detail for scale or timeout_s beyond what the schema already documents.

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?

States a specific verb+resource: capture the device's framebuffer and write a PNG, with the added detail that pixels are exact for BaseUI and MUI including color. It does not name or differentiate itself from the sibling capture_screen, so an agent must infer the distinction.

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 clear preconditions (firmware with screen-mirror support; older firmware times out) and a concrete recovery path (blank: true → capture again with wake). It stops short of saying when to use this versus capture_screen.

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