Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
UNIFI_URLYesAddress of your UniFi console. For a legacy self-hosted Network application, include the port.
UNIFI_SITENoThe site's short name, used when a request doesn't name a site.default
UNIFI_API_KEYNoAPI key from UniFi Network → Settings → Control Plane → Integrations. Or use a username and password.
UNIFI_PASSWORDNoThe local account's password, used with the username.
UNIFI_TOOLSETSNoOptional comma-separated list to expose fewer tools, e.g. overview,devices,clients. Empty means all except raw, which has to be listed by name.
UNIFI_USERNAMENoA local (not Ubiquiti cloud) account, used instead of an API key. Required for legacy controllers.
UNIFI_AUDIT_LOGNoSet to stderr to log every change the assistant makes or previews as JSON lines. Off when empty.
UNIFI_VERIFY_SSLNoLeave empty when you set a fingerprint. true: publicly trusted certificate. false: skip the check (insecure).
UNIFI_ALLOW_WRITESNoAllow changes: restart devices, block clients, edit WiFi, firewall and networks. Off means read-only.false
UNIFI_ALLOW_DELETESNoAlso allow deleting configuration and forgetting clients. Needs UNIFI_ALLOW_WRITES.false
UNIFI_ALLOW_SECRETSNoAllow unredacted passwords and keys (include_secrets) and the WiFi QR tool. Off keeps all output redacted.false
UNIFI_TLS_FINGERPRINTNoRecommended for an https controller with a self-signed certificate: its SHA-256 fingerprint, to pin it.
UNIFI_RAW_ALLOWED_PATHSNoOptional comma-separated API path prefixes, e.g. /api/s/default/stat, that limit the raw API tool (toolset raw) to those paths. Empty allows any path.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Tools for monitoring and managing a Ubiquiti UniFi Network controller. Start with unifi_get_site_health, unifi_list_devices or unifi_list_clients. Most tools take an optional site; use unifi_list_sites to find site names. List tools return {total, returned, items}; use their search, fields and limit arguments to fetch only what you need. unifi_save_* tools create an object when no id is given and update it (changing only the fields passed) when an id is given. The server is read-only; write tools are disabled (UNIFI_ALLOW_WRITES=false).

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
unifi_check_firewall_pathA

Read-only "what if": for a new connection from source to destination (and destination port), work out the source and destination zones from the networks' subnets (addresses outside every local subnet are in the External zone), then walk the enabled zone-based firewall policies between those zones in index order and report the first that matches, so the verdict (ALLOW, BLOCK or REJECT). IP and port groups are looked up and evaluated. Policies that might match first but can't be evaluated from addresses (apps, domains, regions, schedules, or a source port when source_port isn't given) are listed under may_match_first, and when one of them is listed the verdict is only certain if it doesn't match. Traffic rules that match the source and destination are listed too. It reads the configuration only: no traffic is sent, and the controller's own evaluation can differ in details. Network 9.0+ (zone-based firewall).

unifi_check_updatesA

Check for updates in one call: the latest Network application version the controller knows of (controller), the devices with a firmware upgrade (current and available version) and how many are up to date. For every device's firmware use unifi_get_firmware_status.

unifi_get_clientA

Get one client by MAC: its stored settings (alias, note, fixed IP, blocked) merged with live connection details when it is connected, and an online flag. Errors if the controller has never seen the MAC.

unifi_get_dashboardA

Get the aggregated dashboard the UniFi UI shows: WAN/ISP quality history (latency, packet loss, availability, throughput), WiFi experience and client mix. v2 API, Network 7.4+; large response.

unifi_get_deviceA

Get one device by MAC: its list summary plus serial, ports, radio settings and stats, outlets, WAN links, system stats, load average, PoE use and LED settings. Errors if no device has that MAC. For a switch's ports with LLDP neighbours and profile names use unifi_list_switch_ports.

unifi_get_dpi_statsA

Get deep packet inspection (traffic identification) statistics, by application or by category, biggest first: site-wide, or per client when macs are given. Uses the v2 traffic endpoint (Network 9+), with names from the official API when an API key is configured, and falls back to the classic stat/sitedpi on older versions. Requires traffic identification to be enabled.

unifi_get_firewall_policy_orderingA

Get the evaluation order of user-defined policies between a source and destination zone (beforeSystemDefined / afterSystemDefined policy ID lists). Uses the official integration API, so it requires API-key authentication (UNIFI_API_KEY) and Network 9.0+.

unifi_get_firmware_statusA

List each device's model and firmware version, whether an upgrade is available (and to which version) or running, with the number of upgradable devices; include_available adds the firmware images the controller can install. Availability is as of the controller's last check with Ubiquiti. unifi_check_updates also covers Network application updates.

unifi_get_guest_portal_settingsA

Get guest portal / hotspot settings: authentication method, session length, voucher/password/payment options, redirect, allowed subnets.

unifi_get_rf_scanA

Get an access point's last RF/spectrum scan: whether a scan is running, when it last ran, and utilization and interference per channel. Returns scanning: false and no results if the AP has no scan.

unifi_get_security_settingsA

Get threat management (IDS/IPS mode, categories, protected networks), traffic identification (DPI) and country/region blocking (geo-IP) settings. Optionally list the IPS categories the controller supports (Network 8+).

unifi_get_site_healthA

Get a site's status per subsystem (wan, lan, wlan, vpn, www): status, ISP, WAN IP, latency, throughput, and device and client counts. The quickest overall check of a site. For WAN quality over time use unifi_get_dashboard.

unifi_get_site_settingsA

Get site-wide settings. Each setting is an object identified by key, e.g. mgmt (auto-upgrade, LEDs, SSH), country, locale, ntp, snmp, mdns (multicast DNS), rsyslogd (remote syslog), connectivity, guest_access, ips, dpi, usg (gateway: DNS, geo-IP, UPnP...), radius, network_optimization, super_mgmt (controller-wide, including auto-backup). Omit key to list all keys.

unifi_get_speedtest_resultsA

List the gateway's WAN speed test results, newest first (default last 168 hours): time, download and upload in Mbps, latency in ms and test server.

unifi_get_system_infoA

Get the controller's own details (stat/sysinfo): Network application version, hostname, timezone, uptime and whether an application update is available. To check application and device firmware updates together use unifi_check_updates. For each device's firmware use unifi_get_firmware_status.

unifi_get_system_logA

Read one class of the v2 system log (Network 8+), paged (default 50 entries from the last 168 hours): device-alert (default), client-alert, admin-activity (logins and config changes), update-alert, threat-alert (IPS/honeypot), vpn-alert, triggers (firewall policy and traffic rule hits; on Network 10.6+, where that class is gone, read from the full log and filtered here) or next-ai-alert. Entries have time, key, category, severity, title, message, device and client. unifi_list_events reads the classic event log.

unifi_get_traffic_reportA

Get historical time-series statistics in buckets of 5 minutes to a month. scope=site for whole-site traffic and client counts, gw for gateway CPU/memory/WAN traffic, ap for per-AP traffic, user for per-client traffic (pass macs). For traffic by application use unifi_get_dpi_stats.

unifi_list_acl_rulesA

List switch ACL rules (MAC ACLs that allow or block traffic between devices inside one network, enforced by UniFi switches). Rules are processed in acl_index order. Needs Network 9.4+.

unifi_list_adminsA

List a site's administrator accounts, or every site's with all_sites: true: name, email, role, super admin and owner flags, permissions, sites and last login. Network 11 and later on UniFi OS consoles manage admins in UniFi OS and refuse this.

unifi_list_alarmsA

List controller alarms (alerts), newest first, with time, key, subsystem and message; archived alarms are left out unless include_archived. On Network 10.6+, where the classic alarm list is gone, returns the v2 system log's entries of min_severity (default high) from the last hours (default 168) instead. For the full event history use unifi_list_events.

unifi_list_anomaliesA

List anomalies the controller detected per client or device (e.g. high latency, DNS timeouts, poor WiFi experience), default last 24 hours. Rows are returned as the controller reports them; not available on every Network version.

unifi_list_ap_groupsA

List access point groups (id, name, member AP MACs, device count, default flag), which choose the APs that broadcast each WiFi network. Network 7.x+ (v2 API).

unifi_list_backupsA

List the backups stored on the controller, newest first: filename, time, Network version, size in MB and type.

unifi_list_bandwidth_profilesA

List bandwidth profiles (user groups): per-client download and upload caps in kbps ("unlimited" when uncapped) that WiFi networks and clients can be assigned.

unifi_list_client_sessionsA

List client connection sessions, newest first (default last 168 hours): client, IP, connect and disconnect times, duration, AP, SSID, network and bytes; filter by client MAC or guest/user. For who is connected now use unifi_list_clients.

unifi_list_clientsA

List the clients connected now, with IP, network, AP or switch port, signal, rates, usage and uptime; filter by connection type, guests, network or AP. For offline clients and stored settings (alias, fixed IP, blocked) use unifi_list_known_clients. For connection history use unifi_list_client_sessions.

unifi_list_content_filtersA

List content filtering profiles (blocked categories, safe search, target networks/clients). v2 API, Network 8.1+.

unifi_list_devicesA

List the site's UniFi devices (gateways, switches, access points...) with state, model, firmware, IP, uptime, CPU and memory load and client counts; filter by type or state. For one device's ports, radios and uplink use unifi_get_device.

unifi_list_dns_recordsA

List the gateway's local DNS records (A, AAAA, CNAME, MX, TXT, SRV, NS) with name, value, TTL and enabled state. Network 8.2+ (v2 static-dns). For a public hostname that follows the WAN IP use unifi_list_dynamic_dns.

unifi_list_dynamic_dnsA

List the gateway's dynamic DNS entries, which keep a public hostname pointed at the WAN IP: provider service, hostname, login, server and WAN interface (passwords redacted).

unifi_list_eventsA

List recent controller events, newest first (default last 24 hours): client connects and roams, device restarts, upgrades and the like, with time, key, subsystem and message. Falls back to the v2 system log's device and client alerts where the classic event log is gone or empty. For other log classes (admin activity, threats, VPN...) use unifi_get_system_log; for unresolved problems use unifi_list_alarms.

unifi_list_firewall_groupsA

List firewall groups (address groups, IPv6 address groups and port groups) referenced by firewall rules and policies.

unifi_list_firewall_policiesA

List zone-based firewall policies (Network 9.0+) sorted by index: action, source and destination (zone and match), protocol, connection states, schedule and logging. Predefined (system) policies are left out unless include_predefined. On classic firewalls use unifi_list_firewall_rules; to find the policy that applies to a connection use unifi_check_firewall_path.

unifi_list_firewall_rulesA

List classic firewall rules, sorted by ruleset (WAN_IN, LAN_IN, ...) and rule_index, with action, protocol, source and destination. Not available on Network 11+ or on sites migrated to the zone-based firewall (Network 9+): use unifi_list_firewall_policies there.

unifi_list_firewall_zonesA

List zone-based firewall zones (Network 9.0+) with zone_key, system-defined flag, network IDs and integration_id. Firewall policies and unifi_check_firewall_path refer to zones by these IDs.

unifi_list_guest_authorizationsA

List guest portal/hotspot authorizations, newest first (default last 168 hours): client MAC and IP, method, voucher code, start and end, bytes and expired flag.

unifi_list_hotspot_operatorsB

List hotspot operator accounts (staff who can log in to the hotspot manager to issue vouchers).

unifi_list_known_clientsA

List every client the controller has stored, online or offline, most recently seen first, with alias, note, fixed IP and block status. For live connection details use unifi_list_clients or unifi_get_client.

unifi_list_nat_rulesA

List NAT rules (DNAT, SNAT and masquerade, the predefined ones included) with type, interfaces, translated IP and port, source and destination. Needs Network 9.0+ with a UniFi gateway and the zone-based firewall. Simple port forwards are separate: unifi_list_port_forwards.

unifi_list_networksA

List every configured network (LANs/VLANs, WANs and VPNs) with purpose, subnet, VLAN, DHCP range, domain and firewall zone. For WAN connection settings and health use unifi_list_wans. For VPN settings use unifi_list_vpns.

unifi_list_oon_policiesA

List object-oriented networking (OON) policies: rules attached to clients or client groups that schedule or block internet access and apps (secure), limit bandwidth (qos) or route through a VPN (route). Needs Network 9.4+ with a UniFi gateway.

unifi_list_port_forwardsA

List port forwards (WAN port to internal IP and port) with protocol, WAN interface, allowed source and logging. Custom DNAT/SNAT rules are in unifi_list_nat_rules, and the rules that filter traffic in unifi_list_firewall_policies (unifi_list_firewall_rules on classic firewalls).

unifi_list_port_profilesA

List switch port profiles (reusable port configurations): forwarding mode, native and tagged networks, PoE, speed, isolation, storm control and port security. unifi_list_switch_ports shows which profile each port uses.

unifi_list_qos_rulesA

List QoS rules from the policy table (recent Network 9.x/10.x with a UniFi gateway): objective (LIMIT, PRIORITIZE or LIMIT_AND_PRIORITIZE), rate limits in kbps, the clients/networks they apply to and the apps, IPs, regions or domains they match.

unifi_list_radius_accountsA

List users of the built-in RADIUS server (used for L2TP VPN and WPA-Enterprise). Passwords redacted.

unifi_list_radius_profilesA

List RADIUS profiles used by WPA-Enterprise WiFi, 802.1X switch ports and L2TP VPN (secrets redacted).

unifi_list_rogue_apsA

List access points your APs can hear (neighbours and ones flagged as rogue), strongest first (default seen in the last 24 hours): SSID, BSSID, channel, band, signal, security, vendor, which of your APs saw it and when. For per-channel interference use unifi_get_rf_scan.

unifi_list_routesA

List user-defined static routes: destination CIDR, type (nexthop, interface or blackhole), next hop or interface, distance and enabled. With active: true, return the gateway's live routing table instead, system routes included (stat/routing; not on every version). To send chosen clients or destinations out a particular WAN or VPN use unifi_list_traffic_routes.

unifi_list_sitesA

List the controller's sites with id, name, description, role and device_count. Pass a site's name (not its description) as the site argument of other tools.

unifi_list_switch_portsA

List a switch's ports with link state, speed, PoE, assigned profile, LLDP neighbours (what is plugged in: chassis ID, description and remote port), link aggregation and any per-port overrides configured on the device.

unifi_list_threatsA

List IDS/IPS threat events detected by the gateway, newest first (default last 24 hours): signature, category, severity, action taken, protocol, and source and destination IP, port and country. On Network 11 and later, where the classic IPS event list is gone, reads the v2 system log's threat-alert entries instead (title, message, severity, status and source and destination IP; no signature details).

unifi_list_traffic_flowsA

List recent traffic flows seen by the gateway (Insights > Flows): source and destination client, IP, domain and network, app/service, allowed or blocked, risk, bytes and the policies that matched. This is an expensive query on the gateway, so it looks back 15 minutes (hours: 0.25) and returns 50 flows per page by default; narrow it with client_mac, action, risk or search (applied by the controller to app, domain, client name and more) before widening the window. Recent Network 9.x/10.x with a UniFi gateway.

unifi_list_traffic_routesA

List traffic routes (policy-based routing): which clients or networks, and which destinations (domains, IPs, regions or all internet), are sent out a given WAN or VPN client network, with kill switch and next hop. Plain destination-based static routes are in unifi_list_routes.

unifi_list_traffic_rulesA

List traffic rules (v2 API) that block, allow or rate-limit traffic from clients or networks by app, app category, domain, IP, region or all internet, with schedule and bandwidth limit. Zone-based firewall policies are separate (unifi_list_firewall_policies).

unifi_list_vouchersA

List hotspot vouchers with code, note, duration, quota and times used, status, rate and data limits, and creation time. For who redeemed them use unifi_list_guest_authorizations.

unifi_list_vpnsA

List the gateway's VPN servers (WireGuard, OpenVPN, L2TP), VPN clients and site-to-site VPNs with kind, enabled state, subnet, port, WAN interface, peer and remote subnets and DNS. raw: true shows every field.

unifi_list_wansA

List WAN connections with connection type, VLAN, static IP or PPPoE user, DNS, failover and load balancing, Smart Queues and ISP speeds, plus live WAN health (status, WAN IP, ISP, uptime).

unifi_list_wlansB

List WiFi networks (SSIDs) with security and WPA mode, bands, linked network, AP groups, bandwidth and RADIUS profiles, guest and hidden flags, client isolation, MAC filter and enabled state (passphrases redacted).

Prompts

Interactive templates invoked by user choice

NameDescription
firmware_reviewList devices and the controller with available updates and propose a safe upgrade order.
network_health_checkOverall health review of a UniFi site: WAN, devices, clients, alarms and recent problems.
security_reviewReview the site's security posture: threat management, firewall, port forwards, WiFi security and admins.
troubleshoot_clientInvestigate why a specific client (by MAC, name or IP) has connectivity problems.
wifi_optimizationAnalyse WiFi channels, utilisation, interference and client experience and suggest improvements.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 58 tools

Disambiguation4/5

Descriptions do heavy lifting to separate otherwise overlapping areas: list_clients vs list_known_clients vs list_client_sessions vs get_client, and the six-plus firewall tools (policies, rules, traffic_rules, acl_rules, oon_policies, qos_rules) are each explicitly scoped with 'for X use Y' pointers. A handful of clusters (firewall variants, routes vs traffic_routes, events vs system_log vs alarms) still require careful reading, but boundaries are stated rather than implied.

Naming Consistency5/5

Every tool uses the same unifi_<verb>_<noun> pattern with a small, predictable verb set: get_ for a single entity, list_ for collections, check_ for the three read-only diagnostic/verdict tools. No camelCase mixing or vague verbs anywhere across all 58 tools.

Tool Count2/5

58 tools is far past the point where an agent can hold the surface in mind, spanning firewall, WiFi, switching, VPN, DNS, hotspot, RADIUS, backups, DPI, threats and reporting. Many are version-gated variants of the same concept, which inflates the count beyond the core monitoring scope.

Completeness3/5

Read coverage is exceptionally thorough for a UniFi controller, but the surface is entirely read-only: no create/update/delete for firewall policies, vouchers, port forwards, clients (block/alias), WLANS, or device actions like firmware upgrade or restart. An agent can diagnose nearly anything but cannot remediate, which is a notable lifecycle gap for a network-management domain.

Maintenance

ActivityActive
ResponsivenessOutdated data