Skip to main content
Glama

get_camera_snapshot

Read-only

Capture a still frame from a UniFi Protect camera and return it as a base64 JPEG, with optional width/height resizing and device selection.

Instructions

Capture a still image from a connected Protect camera as a base64 JPEG.

Read-only operation: it requests a live frame from the camera and returns it as a base64-encoded JPEG plus camera name and id. If width and/or height are provided the image is resized to those pixel dimensions; if omitted the camera's native resolution is returned. A camera that is not in the CONNECTED state returns a success=false result rather than an image. Use get_camera_details to confirm the camera is online before calling.

Args: camera_id: Protect camera identifier or name to capture from. device: Optional Protect console name to target a specific UniFi Protect device; omit to use the first Protect-enabled device. width: Optional target pixel width for the snapshot; native width if unset. height: Optional target pixel height for the snapshot; native height if unset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNoOptional target pixel width for the snapshot; native width if unset.
deviceNoOptional Protect console name to target a specific UniFi Protect device; omit to use the first Protect-enabled device.
heightNoOptional target pixel height for the snapshot; native height if unset.
camera_idYesProtect camera identifier or name to capture from.
Install Server

TDQS

A4.1/5.0
Behavior5/5

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

The description goes well beyond the readOnlyHint annotation by explaining the live-frame request, the base64 JPEG plus camera name/id return value, resize behavior, and the success=false result for non-CONNECTED cameras. This gives the agent a strong model of what will happen when invoked.

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 main behavioral description is front-loaded and concise, with useful failure-mode and resize details. The Args block duplicates the schema descriptions, which adds mild redundancy, but the overall structure is readable and not bloated.

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 read-only tool with no output schema, the description is remarkably complete: it specifies the return format, behavior with optional width/height, the offline-camera failure case, and the recommended pre-check via get_camera_details. Nothing essential 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 description coverage is 100%, so the schema already documents all four parameters. The Args section repeats the schema descriptions essentially verbatim, adding no new semantic information beyond what is already in the input 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?

The description clearly states the tool captures a still image from a Protect camera as a base64 JPEG, which is a specific verb and resource. It does not explicitly differentiate from related sibling tools like export_portable_snapshot or get_snapshot_capabilities, though the first sentence makes the core purpose unambiguous.

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?

The description provides clear context, including the behavior for offline cameras and a direct recommendation to use get_camera_details to confirm the camera is online before calling. However, it does not explicitly state when to prefer this tool over related alternatives such as export_camera_clip or export_portable_snapshot.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mikeholownych/unifi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server