Skip to main content
Glama
jaseonline

unifi-console-mcp

by jaseonline

unifi_console_data_retention

DestructiveIdempotent

Preview and apply UniFi console data retention changes for statistics and events. Confirm a fingerprint to update retention hours after a read-only preview.

Instructions

Preview, then apply, a change to how long the console keeps statistics and events (Control Plane > Network data retention).

Two steps, always: call with confirm=false to get a read-only preview (the retention fields only: before, after, diff, warnings, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. Fields: data_retention_setting_preference (auto or manual) and, with manual, hours_5minutes, hours_hourly, hours_daily, hours_monthly, hours_others. The rest of the group (auto-backup, analytics and a Google Maps key) is sent back exactly as read and never shown. Shortening retention deletes older data at the next prune; longer retention uses more storage. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'data_retention' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that shortening retention deletes older data at the next prune and longer retention consumes more storage, that writes are journalled, and that the fingerprint from the preview is required to apply. It also clarifies the read-only preview return fields and that untouched settings in the group are echoed back but never shown, which the destructiveHint annotation alone cannot convey.

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 purpose, then the two-step protocol, then fields, side effects and auth. Dense and mostly waste-free, though the field enumeration and the aside about auto-backup/analytics/Google Maps key could be tightened slightly.

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?

An output schema exists, so return values needn't be detailed, yet the description still names the preview payload (before, after, diff, warnings, fingerprint). Combined with the destructive-effect warning, auth requirements, and journalling note, nothing an agent needs to call this correctly 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?

Explains the semantics of confirm (preview vs apply), fingerprint (must come from the preview of exactly this change), and data_retention_setting_preference (auto vs manual gating the hours_* fields), which is meaningful even though the schema also describes them. It does not add much beyond the schema for the individual hours_* fields, so not a full 5.

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 verb pair (preview/apply) and a specific resource (how long the console keeps statistics and events), and pins the exact settings location (Control Plane > Network data retention). It is unambiguously distinguishable from all siblings, none of which touch retention.

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?

Gives the exact operating protocol: 'Two steps, always' – confirm=false for a read-only preview, then the same fields plus confirm=true and the fingerprint to apply. It also states the preconditions (UNIFI_CONSOLE_ENABLE_WRITES=true and 'data_retention' in UNIFI_CONSOLE_WRITE_ENTITIES), so an agent knows when the call will succeed.

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