Skip to main content
Glama

get_smart_detections

Read-only

Retrieve AI-classified smart-detection events (person, vehicle, animal, package) from UniFi Protect with type, camera, timestamp, and confidence.

Instructions

Return AI smart-detection events (person, vehicle, animal, package) with types.

Read-only operation: it queries Protect smart-detection events over the lookback window, maps each to its camera name and timestamp, and includes the smartDetectTypes and confidence score. Requires Protect username/password credentials configured for the console. Use detection_type to narrow to one class (e.g. "person"); use get_motion_events for raw motion without classification, or get_protect_event_summary for aggregate counts.

Args: hours: Lookback window in hours from now (default 24). limit: Maximum number of events to return (default 50). detection_type: Optional class filter - one of "person", "vehicle", "animal", "package"; omit for all smart-detection types. device: Optional Protect console name to target a specific UniFi Protect device; omit to use the first Protect-enabled device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hoursNoLookback window in hours from now (default 24).
limitNoMaximum number of events to return (default 50).
deviceNoOptional Protect console name to target a specific UniFi Protect device; omit to use the first Protect-enabled device.
detection_typeNoOptional class filter - one of "person", "vehicle", "animal", "package"; omit for all smart-detection types.
Install Server

TDQS

A4.3/5.0
Behavior4/5

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

Annotations include readOnlyHint: true, and the description reinforces consistent read-only behavior while adding useful behavioral context: it queries the lookback window, maps events to camera name and timestamp, includes smartDetectTypes and confidence score, and requires Protect credentials. This goes beyond what annotations alone convey, though it does not address rate limits, ordering, or pagination.

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 description is well-structured with a front-loaded purpose statement, followed by behavioral guidance, sibling routing, and a compact Args section. It is appropriately sized, though the Args block largely duplicates schema descriptions, which is redundant if the schema is visible to the agent.

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?

Given no output schema, the description reasonably conveys the essential return content: smart-detection types, camera name, timestamp, smartDetectTypes, and confidence score. It covers credentials, filtering, and alternatives. Minor gaps include lack of detail on result ordering, pagination behavior, and the structure of each returned event beyond the listed fields.

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 input schema already documents all four parameters. The description repeats the same parameter explanations rather than adding new semantic detail beyond the schema. It does not introduce examples, edge cases, or format constraints beyond what is already present.

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?

The description opens with a specific verb and resource: 'Return AI smart-detection events (person, vehicle, animal, package) with types.' It clearly identifies what the tool returns and distinguishes it from related tools by naming the smart-detection classes and the fact that it operates on Protect events.

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

Usage Guidelines5/5

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

Provides explicit guidance on when to use this tool versus alternatives: it names get_motion_events for raw motion without classification and get_protect_event_summary for aggregate counts. It also explains how to narrow results via detection_type and notes the Protect credentials prerequisite.

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