Create Network (LAN/VLAN)
unifi_create_networkCreates a new LAN network or VLAN on a UniFi site from a full network object, requiring name, VLAN ID, management type, enabled flag, and IP configuration for managed networks.
Instructions
Create a new LAN network / VLAN on a site. 'config' is the full network object; required for all: name (string), vlanId (integer), management (string), enabled (boolean). For GATEWAY/SWITCH-managed networks (management != "UNMANAGED"), ipv4Configuration (subnet + DHCP) is ALSO required — plus, for GATEWAY, isolationEnabled, internetAccessEnabled, and cellularBackupEnabled. Easiest: model it on an existing network fetched via unifi_get_network with responseFormat='json', changing name/vlanId/subnet. Returns the created network.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"config": "<config>"
},
"name": "unifi_create_network"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Full network object. Required: name, vlanId, management, enabled (+ ipv4Configuration and, for GATEWAY, isolationEnabled/internetAccessEnabled/cellularBackupEnabled). See unifi_get_network (json) for the full shape. A config with any value still containing "[redacted]" (how reads show credentials) is refused: put the real value in, or leave the field out. | |
| siteId | No | Site ID (UUID from unifi_list_sites). Optional — when the console has exactly one site it is used automatically. |