Skip to main content
Glama

apply_vm_tag

Apply an NSX tag to a virtual machine using its VM ID, tag scope, and tag value. The operation is additive, preserving existing tags, and returns the applied tag for verification.

Instructions

[WRITE] Apply an NSX tag to a virtual machine.

Returns {"status": "applied", "vm_id", "scope", "tag"} — not the VM's tag list. Use list_vm_tags first for the vm_id, and again after to see the result. Additive, so existing tags survive, but note that tag-based group membership shifts as NSX re-evaluates: check with get_group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vm_idYesVM external ID (fabric UUID, from list_vm_tags).
targetNoOptional NSX Manager target from config.
tag_scopeYesTag scope (e.g. 'env', 'tier', 'owner').
tag_valueYesTag value (e.g. 'production', 'web').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.10.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / tag_scope / description
      Added value: +"Tag scope (e.g. 'env', 'tier', 'owner')."
    • addedInput schema / properties / tag_value / description
      Added value: +"Tag value (e.g. 'production', 'web')."
    • addedInput schema / properties / target / description
      Added value: +"Optional NSX Manager target from config."
    • addedInput schema / properties / vm_id / description
      Added value: +"VM external ID (fabric UUID, from list_vm_tags)."
  2. Addedv1.5.29
  3. Removedv1.5.28
  4. First observedv1.3.2

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that the tool is additive, that it returns only a status object rather than the VM's tag list, and that tag-based group membership may shift after NSX re-evaluation. These are meaningful behavioral details not visible in readOnlyHint, destructiveHint, or idempotentHint.

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 three sentences with no filler: the action comes first, followed by the exact return shape and workflow, then the side-effect warning. Every sentence contributes information that is not already present in the schema.

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 compensates by specifying the return shape. It also covers the necessary ordering, verification steps, and a non-obvious side effect. For a write operation with well-documented parameters, this is sufficient for an agent to invoke the tool correctly.

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

Parameters3/5

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

The input schema already documents all four parameters with 100% coverage, including the source of vm_id, the optional target, and the meanings of tag_scope and tag_value. The description adds little parameter-specific meaning beyond noting the vm_id source, which the schema already states, so the baseline value of 3 is appropriate.

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 action ('Apply an NSX tag') on a specific resource ('a virtual machine'), which clearly distinguishes it from siblings like list_vm_tags and remove_vm_tag. The return-value note also reinforces that this is not a retrieval operation.

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 workflow guidance: use list_vm_tags first to obtain the vm_id and again afterward to observe the result, and check get_group for group-membership effects. It does not explicitly contrast with remove_vm_tag, but the usage context and sequencing are clear enough for an agent to proceed.

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