Skip to main content
Glama

list_static_routes

Retrieve configured static routes on a Tier-1 gateway to view network path definitions and routing configurations.

Instructions

List static routes on a Tier-1 gateway.

Args: tier1_id: The Tier-1 gateway ID. target: Optional NSX Manager target name from config. Uses default if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tier1_idYes
targetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler function for `list_static_routes` which calls the underlying operational helper.
    def list_static_routes(tier1_id: str, target: str | None = None) -> list[dict]:
        """List static routes on a Tier-1 gateway.
    
        Args:
            tier1_id: The Tier-1 gateway ID.
            target: Optional NSX Manager target name from config. Uses default if omitted.
        """
        from vmware_nsx.ops.networking import list_static_routes as _list_routes
    
        client = _get_connection(target)
        return _list_routes(client, tier1_id)
  • The core implementation of the static route listing logic, interacting directly with the NSX API.
    def list_static_routes(
        client: NsxClient,
        gateway_id: str,
        gateway_type: str = "tier1",
    ) -> list[dict]:
        """List static routes on a gateway (Tier-0 or Tier-1).
    
        Args:
            client: Authenticated NSX API client.
            gateway_id: Gateway identifier.
            gateway_type: Either "tier0" or "tier1" (default "tier1").
    
        Returns:
            List of static route dicts.
        """
        gw_resource = "tier-0s" if gateway_type == "tier0" else "tier-1s"
        path = f"/policy/api/v1/infra/{gw_resource}/{gateway_id}/static-routes"
        items = client.get_all(path)
        return [
            {
                "id": _sanitize(r.get("id", "")),
                "display_name": _sanitize(r.get("display_name", "")),
                "network": _sanitize(r.get("network", "")),
                "next_hops": [
                    {
                        "ip_address": _sanitize(
                            nh.get("ip_address", "")

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