Skip to main content
Glama

create_network

Create a VLAN on a UniFi site with network_config specifying VLAN ID, DHCP, subnet, and access policies to segment network traffic.

Instructions

Create a new network/VLAN on a site.

host: console name, ID, or composite ID (MAC:numericId format). site: site name or ID. Validated locally before the request (a missing field raises ValueError naming it): management — the discriminator the controller validates first. The rest of the required schema is management-mode-specific and enforced by the controller. network_config: for management='GATEWAY' the controller also requires (verified live):

  • name (str, max 32 chars)

  • vlanId (int, 1-4094)

  • enabled (bool)

  • internetAccessEnabled (bool)

  • isolationEnabled (bool)

  • cellularBackupEnabled (bool)

  • ipV4Configuration: {'dhcpMode': 'SERVER'|'RELAY'|'NONE', 'subnet': str CIDR, 'hostAddress': str, 'netmask': str, 'broadcastAddress': str, 'dhcpRangeStart': str, 'dhcpRangeStop': str} Optional: zoneId (str, zone UUID from list_firewall_zones_proxy), mdnsForwardingEnabled (bool). Field names are camelCase; there is no 'purpose' field in the Network Integration API.

D12 auto-exclusion: UniFi silently adds every new network to the excluded_networkconf_ids of ALL custom-tagged port profiles (tagged_vlan_mgmt == 'custom'), blackholing the VLAN at the host uplink. When that happens this response carries a warnings entry (code D12_AUTO_EXCLUSION) naming each affected profile; run allow_network_on_port_profile on each to restore tagging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
siteYes
network_configYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.9/5.0
Behavior5/5

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

There are no annotations provided, so the description fully carries the burden of explaining behavior. It thoroughly discloses the side effect of D12 auto-exclusion (networks silently added to custom-tagged port profiles, blackholing VLANs), explicitly states local validation with error naming, and notes the controller's enforcement of management-mode-specific schema. It also clearly indicates that field names are camelCase and there is no 'purpose' field, preventing common mistakes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is detailed but organized with clear sections: a one-line summary, field definitions, parameter requirements, and a distinct warning block. It front-loads the core purpose, then provides essential nested schema, then the critical behavioral warning. Every sentence earns its place, and the formatting makes it easy to scan.

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?

Given that there is no annotation schema and the input schema is minimal, the description provides comprehensive information: the full required schema for the main management mode, optional fields, validation semantics, error behavior, and the D12 auto-exclusion side effect with remediation instructions. It fully equips an agent to construct a correct request and handle a known failure mode. The return output schema exists and includes a warnings entry, which is acknowledged.

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?

The input schema only lists host, site, and network_config as generic strings/objects with 0% description coverage. The description compensates by defining what each top-level field means (host: console name, ID, or composite ID; site: site name or ID), and provides the full nested schema for network_config when management='GATEWAY', including types for each field. It doesn't document every possible management mode, but it does explain the structure and optional fields for the main case.

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 clearly states the action 'Create a new network/VLAN on a site' with the primary resource (network/VLAN) and context (site). It distinguishes this from sibling tools by specifying it creates a network as opposed to updating, deleting, or listing networks. The additional detail about management-mode-specific schema further clarifies the scope.

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?

The description provides explicit when-to-use context: it details the required parameters (host, site, network_config), gives a concrete example of the GATEWAY management-mode schema, and warns about the D12 auto-exclusion behavior with specific remediation steps (run allow_network_on_port_profile). It also implicitly distinguishes this from update_network, delete_network, and list_networks by focusing on creation and the unique caveats.

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/swkstudios/unifi-fabric-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server