Skip to main content
Glama

create_traffic_route

Create a traffic route on a UniFi site to enable policy-based routing or WAN load-balancing by specifying source network, matching target, and target devices.

Instructions

Create a traffic route on a site (policy-based routing / WAN load-balancing).

host: console name, ID, or composite ID (MAC:numericId format). site: site name or ID. payload: required fields (validated locally — a missing field raises ValueError naming it — and verified against the live controller). This v2 endpoint uses snake_case wire field names (verified: 'network_id' is accepted, 'networkId' is not):

  • network_id (str): source network UUID (from list_networks), or 'ANY'

  • matching_target: 'INTERNET'|'ALL' or a traffic matching list ID

  • target_devices: the devices/networks the route applies to Optional: matching_target_type ('INTERNET'|'DOMAIN'|'IP_GROUP'), description (str).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
siteYes
payloadYes
Install Server

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it discloses local validation raising ValueError, verification against the live controller, and the snake_case wire-format constraint with a concrete accepted/rejected example. It does not describe response behavior or side effects, but for a create operation the mutation is clear from the tool's name and first sentence.

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 dense but appropriately sized for a nested-object create tool. It front-loads the main verb and resource, then covers all parameters in an organized bullet-like layout. Every sentence adds useful information and there is no filler.

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?

The description covers the required payload and field naming in detail, but leaves some gaps: target_devices is not fully specified, the source of 'traffic matching list ID' is not pointed to, and no return/confirmation behavior is mentioned. These are relatively minor against the strong parameter-level detail and no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides only bare string and object types with 0% description coverage, and the description compensates thoroughly: it defines host, site, the required payload keys, accepted values, optional fields, and even warns that 'networkId' is not accepted. This is far beyond what the schema alone supplies.

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 uses a specific verb and resource: 'Create a traffic route on a site' and immediately scopes it with '(policy-based routing / WAN load-balancing)'. This makes the tool clearly distinct from sibling tools like create_traffic_rule or create_traffic_matching_list.

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

Usage Guidelines4/5

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

The tool's intended scenario is clear from the parenthetical scope and the payload guidance (e.g., 'network_id ... from list_networks'). It does not explicitly state when to prefer it over closely related create_traffic_rule, but it provides enough context that an agent can infer the use case.

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