Skip to main content
Glama

UniFi Protect: Get Camera Snapshot

unifi_protect_get_camera_snapshot
Read-only

Capture a fresh still frame from a UniFi Protect camera on demand, saving it as a JPEG to disk or returning it inline so a vision model can inspect the current scene.

Instructions

Capture a still frame from a camera as it looks right now. Writes the JPEG to disk and returns its path, size and content type by default. Set output="image" to get the frame inline instead so a vision model can actually look at it — that costs roughly 300,000 to 700,000 characters of context per call, so choose it deliberately rather than by default. A fresh capture is forced; without that the console can hand back a cached frame that is minutes old.

Input Schema

NameRequiredDescriptionDefault
outputNoWhere the frame goes. "file" writes it to disk and returns the path — cheap, and you can read the file later if it turns out to matter. "image" returns it inline for a model to look at, at a large cost in context.file
cameraIdYesCamera id — the `id` from unifi_protect_list_cameras, a 24-character hex string. Not the camera's name and not its MAC address.
savePathNoAbsolute path to write the JPEG to. Defaults to a timestamped file under UNIFI_PROTECT_SNAPSHOT_DIR. Parent directories are created.
highQualityNoRequest the camera's full resolution rather than a scaled frame. Larger and slower; with output="image" it multiplies an already expensive call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.3.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past readOnlyHint: it discloses the disk write and the returned path/size/content-type, quantifies the context cost of inline images (300k–700k characters), and warns that captures are forced fresh because the console may otherwise serve a cached frame minutes old. The cached-frame caveat is exactly the kind of non-obvious behavior an agent cannot get from structured fields. Minor tension worth noting: 'writes the JPEG to disk' is a local side effect under readOnlyHint=true, though it does not mutate UniFi state, so it reads as annotation granularity rather than contradiction.

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?

Four sentences, each carrying a distinct piece of information: what it does, the default return shape, the expensive alternative with its cost, and the freshness caveat. The most decision-relevant facts (default behavior, cost warning) come early with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter, no-output-schema tool, this covers everything an agent needs to call it safely: what is produced, where it goes, what it costs, and why the frame is guaranteed current. Camera id sourcing is handled in the schema, so nothing material is missing.

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 the baseline is 3; the description still adds value by framing output as a cost tradeoff rather than a plain enum, and by explaining that freshness is forced regardless of parameters. It doesn't touch highQuality or savePath in prose, leaving those entirely to the schema.

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?

Opens with a specific verb+resource and a temporal scope: "Capture a still frame from a camera as it looks right now." The "right now" phrasing implicitly separates it from the event/thumbnail siblings (which return past frames), but no sibling is named explicitly, which keeps it short of a 5.

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 explicit decision guidance for the key fork: default to output="file", and choose output="image" only when a vision model needs to look at the frame, with a stated reason to be deliberate. It doesn't say when to reach for this over unifi_protect_get_event_thumbnail or unifi_protect_export_video, so routing across siblings is left partly to inference.

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