Skip to main content
Glama
CyberKnightLabs

vmware-knight

create_drs_rule

Create VM-VM DRS rules to enforce affinity or anti-affinity, keeping specified VMs together or on separate hosts. Preview changes before confirming.

Instructions

[WRITE] Create a VM-VM DRS rule (affinity or anti-affinity) - preview/confirm gated.

rule_type "affinity" keeps the listed VMs together; "antiAffinity" keeps them apart (e.g. redundant appliance pairs on separate hosts). Requires >=2 distinct VMs, all members of the cluster. VM-Host rules hang off cluster VM/host groups and are not created here. Verify with list_drs_rules. Audited.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNovCenter target name from config.yaml; omit to use the default target.
clusterYesExact cluster name.
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.
enabledNoCreate the rule enabled (default) or disabled.
vm_namesYesVM names the rule governs (>=2, all in the cluster).
rule_nameYesName for the new rule; must be unique on the cluster.
rule_typeYes"affinity" or "antiAffinity".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.12.10

TDQS

A4.7/5.0
Behavior5/5

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

The description significantly augments the annotations by disclosing the preview/confirm gating, the exact behavior of confirm=false vs true, the return dict shapes, error shape, auditability, and membership requirements. Annotations only say readOnlyHint=false, so this added context is genuinely valuable and non-contradictory.

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 front-loaded with the core action and gating flag, then gives rule semantics, constraints, exclusions, verification path, and return format in compact bullets. Every sentence earns its place and there is no redundant filler.

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, the description properly explains the return shapes for preview, created, and error cases. Combined with 100% schema parameter coverage, the tool is fully transparent about what happens at each confirm state, what constraints apply, and how to verify the result.

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 the baseline is 3. The description adds extra meaning for rule_type by explaining the behavioral difference between affinity and antiAffinity, and it reinforces the VM count/cluster membership precondition, going slightly beyond the schema's field-level descriptions.

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 opens with a clear verb and resource: "Create a VM-VM DRS rule (affinity or anti-affinity)". It distinguishes this tool from sibling DRS tools by explicitly stating VM-Host rules are not created here and pointing to list_drs_rules for verification.

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 description gives explicit usage context: it is a preview/confirm gated creation flow, requires >=2 distinct cluster VMs, and excludes VM-Host rules. It references list_drs_rules for verification, though it does not enumerate every sibling alternative (e.g., set_drs_rule_enabled vs create), so it stops short of a full when-not map.

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