Skip to main content
Glama

get_segment_port_for_vm

Read-onlyIdempotent

Identify the NSX segment ports connected to a VM by matching its virtual interface attachments. Returns segment and port details for the specified VM display name.

Instructions

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

Looks up the VM in the NSX fabric inventory by display name, fetches its VIFs (/api/v1/fabric/vifs), and matches segment ports whose attachment id equals a VIF's lport_attachment_id. Returns VM info (external_id, host, power state) and matched_ports (segment id/name, port id/name).

Args: vm_display_name: The VM display name as shown in vCenter/NSX inventory. target: Optional NSX Manager target name from config. Uses 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?

The description details the lookup process (fabric inventory, VIFs, matching) and return values, adding context beyond the annotations. Annotations already indicate readOnly=true, idempotent, open world. No contradictions.

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 well-structured with a heading, detailed explanation, and Args section. It is informative without being overly verbose. Minor redundancy in the introductory line could be trimmed, but overall effective.

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 the tool has only 2 parameters and no output schema, the description covers the core functionality and return structure. It does not mention error cases or edge behaviors, but for a read-only tool this is acceptable.

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?

Schema coverage is 0%, so the description compensates fully: it explains vm_display_name as the VM display name in vCenter/NSX inventory, and target as optional NSX Manager target with default behavior. This adds significant meaning beyond the schema.

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 clearly states the tool's purpose: 'Find which segment(s) a VM is attached to via its VIF attachments.' The verb 'Find' and resource 'segment(s) for a VM' are specific. The tool is distinct from siblings like get_segment or get_tier0_gateway, which focus on different resources.

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

Usage Guidelines3/5

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

The description implies the usage scenario (finding segment ports for a VM), but does not explicitly state when to use this tool versus alternatives, nor does it provide exclusion criteria. Sibling tools include other read operations, but no comparison is made.

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