Skip to main content
Glama
CyberKnightLabs

vmware-knight

create_dvs_portgroup

Create a VLAN-tagged portgroup on a distributed virtual switch. Preview validates the switch, name, binding, and VLAN without changes; confirm then applies the exact configuration.

Instructions

[WRITE] Create a VLAN-tagged portgroup on a dvSwitch - preview/confirm gated.

confirm=False (default) validates everything (switch exists, name free, binding and VLAN legal) and returns the exact spec that WOULD be created without writing anything. confirm=True creates the portgroup and waits for the task. Verify afterwards with list_dvs_portgroups. Audited.

binding="ephemeral" creates a portgroup with no pre-created port pool, attachable from the ESXi host client even when vCenter is down - use for a self-hosted VCSA's own management portgroup. num_ports is ignored for ephemeral. lateBinding is deprecated by vSphere and not offered.

Returns: Preview dict (action="preview", would_create) or result dict (action="created", created). Errors return a dict with "error" + hint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for the new portgroup; must be unique on the switch.
targetNovCenter target name from config.yaml; omit to use the default target.
bindingNo"earlyBinding" (default) or "ephemeral".earlyBinding
confirmNoFalse (default) returns the blast radius and changes nothing. True creates it. Do not set True because the user asked earlier; they have not seen the preview yet.
vlan_idYesVLAN ID to tag (0-4094; 0 = none).
dvs_nameYesName of the distributed virtual switch to create it on.
num_portsNoPort count for earlyBinding portgroups (default 8).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.12.10

TDQS

A4.8/5.0
Behavior5/5

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

The description discloses important behaviors not in the annotations: preview/confirm gating, that confirm=False writes nothing, that confirm=True waits for the task, that the operation is audited, and the exact return dict shapes for success and error cases. Annotations only indicate readOnly=false and destructive=false, so the description carries the full behavioral burden and does so thoroughly.

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?

The description is somewhat long but well-structured: a one-line purpose header, a gating/validation paragraph, an ephemeral binding paragraph, and a returns section. Every section carries essential information, and the purpose is front-loaded. Minor redundancy with parameter schema descriptions keeps it from being perfectly concise.

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?

With no output schema and a complex 7-parameter tool with open-world hints, the description covers what an agent needs: preview/confirm semantics, return value structure (including error dicts), validation behavior, and edge-case binding behavior. It leaves no critical gap for selecting or invoking the tool correctly.

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?

Schema coverage is 100%, so baseline is 3. The description adds meaning beyond the schema by explaining ephemeral binding implications (attachable when vCenter is down, num_ports ignored) and clarifying the output of confirm=False versus confirm=True. It does not deeply explain target or dvs_name, but the schema already covers them adequately, so this is solidly above baseline.

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 states a specific verb and resource: 'Create a VLAN-tagged portgroup on a dvSwitch.' It also immediately signals the preview/confirm gating, which clearly distinguishes this from read-only or other network tools. The scope (VLAN-tagged, dvSwitch) makes it unambiguous among siblings like list_dvs_portgroups or VM tools.

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?

It gives explicit workflow guidance: confirm=False to validate and preview, confirm=True to actually create, and verify afterwards with list_dvs_portgroups. It also names a concrete scenario for ephemeral binding (self-hosted VCSA management portgroup) and explains when num_ports is ignored. This is strong when-to-use and alternative-routing guidance.

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