Skip to main content
Glama

get_segment_port_for_vm

Read-onlyIdempotent

Map a VM name to its NSX segment ports via VIF attachments. Troubleshoot network connectivity by identifying the segment port a VM is using.

Instructions

[READ] Find which segment(s) a VM is attached to via its VIF attachments.

Start here for "why can this VM not reach the network?" — it is the only tool mapping a VM name onto NSX topology. Looks the VM up in the fabric inventory, fetches its VIFs, and matches segment ports by lport_attachment_id. Returns one dict (not the list envelope): VM info (external_id, host, power state) and matched_ports (segment id/name, port id/name). Matching is on exact display name, and empty matched_ports means no VIF is attached, not that the VM is missing.

Then get_logical_port_status on the segment it names. VM power and placement are not managed here — use vmware-aiops.

Args: vm_display_name: VM display name as shown in vCenter/NSX inventory. target: NSX Manager target from config (default if omitted).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
vm_display_nameYes
Behavior4/5

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

Beyond the annotations (readOnlyHint, destructiveHint), the description reveals return structure (one dict, not list envelope), matching logic (exact display name), and edge cases (empty matched_ports means no VIF attached). It also clarifies what is not handled (VM power/placement).

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

Conciseness3/5

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

The description is front-loaded with the main purpose, but multiple paragraphs contain some redundancy (e.g., first sentence expands on finding segments). Could be more concise without losing key details.

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?

Given no output schema, the description explains the return format (one dict with VM info and matched_ports) and semantics of empty results. It covers what the tool does and limitations, making it fairly complete for its complexity.

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?

Despite 0% schema description coverage, the description explains 'vm_display_name' as shown in vCenter/NSX inventory and 'target' as NSX Manager target with default behavior, adding meaning beyond the schema's titles.

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 starts with '[READ] Find which segment(s) a VM is attached to via its VIF attachments.', providing a specific verb+resource. It clearly distinguishes from sibling tools like 'list_transport_nodes' or 'delete_tier1_gateway' by focusing on VM-to-segment mapping.

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?

It explicitly says 'Start here for "why can this VM not reach the network?" — it is the only tool mapping a VM name onto NSX topology.' This gives clear when-to-use context, though it doesn't explicitly state when not to use or list alternatives.

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

Install Server

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/zw008/VMware-NSX'

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