Skip to main content
Glama

export_camera_clip

Destructive

Export a UniFi Protect recording clip as an MP4 file to a local path. Provide camera, start and end timestamps, and output destination.

Instructions

Export a UniFi Protect recording clip as an MP4 file written to local disk.

Mutating, file-writing operation: it resolves the camera (by id or name), fetches the recording for the requested time range, and writes an MP4 file into the server's confined export directory (the path is validated against that directory, so output_path must not escape it). Requires Protect username/password credentials configured for the console. The write is a no-op until confirm is set to true, at which point it returns the written file path and size in bytes. Use get_camera_snapshot for a single still image instead of a time-ranged clip.

Args: camera: Protect camera identifier or name to export footage from. start_ts: Clip start time as a Unix epoch timestamp (seconds). end_ts: Clip end time as a Unix epoch timestamp (seconds); must be after start_ts. output_path: Destination filename (or path relative to the export directory); it is confined to the server's export directory. device: Optional Protect console name to target a specific UniFi Protect device; omit to use the first Protect-enabled device. confirm: Safety confirmation required for this file-writing operation; the export returns a failure message until set to true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cameraYesProtect camera identifier or name to export footage from.
deviceNoOptional Protect console name to target a specific UniFi Protect device; omit to use the first Protect-enabled device.
end_tsYesClip end time as a Unix epoch timestamp (seconds); must be after start_ts.
confirmNoSafety confirmation required for this file-writing operation; the export returns a failure message until set to true.
start_tsYesClip start time as a Unix epoch timestamp (seconds).
output_pathYesDestination filename (or path relative to the export directory); it is confined to the server's export directory.
Install Server

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only mark destructiveHint; the description discloses the file-writing mutation, path confinement validation, credential requirement, no-op-until-confirm semantics, and the returned path/size. This goes well beyond the annotation and contradicts nothing.

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 opening sentence is front-loaded and the prose is information-dense. The Args block duplicates schema content, which adds length, but the description remains structured and every distinct behavioral point earns its place.

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?

With only destructiveHint true and no output schema, the description carries the burden of explaining side effects, safety confirmation, path constraints, credentials, and result shape. It covers all of these, leaving no critical gap for correct invocation.

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 coverage is 100%, so the baseline is 3; the description's Args section largely restates schema text. It adds a bit of prose context about output_path being confined and confirm gating the write, but no new parameter-level details beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action: exporting a UniFi Protect recording clip as an MP4 file written to disk. It distinguishes itself from still-image capture by naming get_camera_snapshot as the alternative, which separates it from sibling tools.

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?

Explicitly tells the agent to use get_camera_snapshot when a single still image is needed instead of a time-ranged clip. It also states the credential prerequisite and the confirm requirement, giving clear context for when the operation will actually write.

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