Skip to main content
Glama

list_transport_zones

Retrieve all transport zones in VMware NSX to view their types and associated host switch names for network configuration management.

Instructions

List all transport zones with type and host switch name.

Args: target: Optional NSX Manager target name from config. Uses default if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function that executes the API call to list transport zones.
    def list_transport_zones(client: NsxClient) -> list[dict]:
        """List all transport zones."""
        path = (
            "/policy/api/v1/infra/sites/default"
            "/enforcement-points/default/transport-zones"
        )
        items = client.get_all(path)
        return [
            {
                "id": _sanitize(tz.get("id", "")),
                "display_name": _sanitize(tz.get("display_name", "")),
                "transport_type": tz.get("tz_type", ""),
                "host_switch_name": _sanitize(tz.get("host_switch_name", "")),
            }
            for tz in items
        ]
  • MCP tool registration for list_transport_zones.
    @mcp.tool()
    def list_transport_zones(target: str | None = None) -> list[dict]:
        """List all transport zones with type and host switch name.
    
        Args:
            target: Optional NSX Manager target name from config. Uses default if omitted.
        """
        from vmware_nsx.ops.inventory import list_transport_zones as _list_tzs
    
        client = _get_connection(target)
        return _list_tzs(client)

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