Skip to main content
Glama

update_tier1_gateway

Modify an existing Tier-1 gateway configuration in VMware NSX by updating its display name, Tier-0 path linkage, or route advertisement settings using partial PATCH operations.

Instructions

Update an existing Tier-1 gateway (partial update via PATCH).

Args: tier1_id: The Tier-1 gateway ID to update. display_name: New display name (optional). tier0_path: New Tier-0 path to link (optional). route_advertisement: New route advertisement types (optional). target: Optional NSX Manager target name from config. Uses default if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tier1_idYes
display_nameNo
tier0_pathNo
route_advertisementNo
targetNo

Implementation Reference

  • The actual implementation of the update_tier1_gateway logic.
    def update_tier1_gateway(
        client: NsxClient,
        tier1_id: str,
        **kwargs: Any,
    ) -> dict:
        """Partial-update an existing Tier-1 gateway via PATCH.
    
        Supported kwargs: display_name, tier0_path, route_advertisement_types,
        failover_mode.
    
        Args:
            client: Authenticated NSX API client.
            tier1_id: Tier-1 gateway identifier to update.
            **kwargs: Fields to update.
    
        Returns:
            Updated Tier-1 gateway dict from NSX API.
        """
        _validate_id(tier1_id)
    
        allowed_fields = {
            "display_name",
            "tier0_path",
            "route_advertisement_types",
            "failover_mode",
        }
        body: dict[str, Any] = {}
        for key, value in kwargs.items():
            if key not in allowed_fields:
                raise ValueError(
                    f"Field '{key}' is not updatable. "
                    f"Allowed: {', '.join(sorted(allowed_fields))}"
                )
            body[key] = value
    
        if not body:
            raise ValueError("No update fields provided.")
    
        path = f"/policy/api/v1/infra/tier-1s/{tier1_id}"
        result = client.patch(path, body)
        _log.info("Updated Tier-1 gateway %s: %s", tier1_id, list(body.keys()))
        return result
  • The MCP tool registration and handler that calls the underlying operation.
    def update_tier1_gateway(
        tier1_id: str,
        display_name: str | None = None,
        tier0_path: str | None = None,
        route_advertisement: str | None = None,
        target: str | None = None,
    ) -> dict:
        """Update an existing Tier-1 gateway (partial update via PATCH).
    
        Args:
            tier1_id: The Tier-1 gateway ID to update.
            display_name: New display name (optional).
            tier0_path: New Tier-0 path to link (optional).
            route_advertisement: New route advertisement types (optional).
            target: Optional NSX Manager target name from config. Uses default if omitted.
        """
        from vmware_nsx.ops.gateway_mgmt import update_tier1_gateway as _update
    
        client = _get_connection(target)
        return _update(
            client, tier1_id,
            display_name=display_name,
            tier0_path=tier0_path,
            route_advertisement=route_advertisement,
        )
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the PATCH method and partial-update behavior (unspecified fields remain unchanged), but omits crucial mutation details like return values, error handling for non-existent IDs, or network disruption risks during gateway updates.

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 appropriately structured with the core purpose front-loaded, followed by an Args section. While repetitive with '(optional)' annotations for each parameter, this redundancy is justified given the complete lack of schema descriptions. No extraneous information is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter infrastructure mutation tool with no annotations and no output schema, the description adequately covers input parameters but leaves gaps regarding success indicators, failure modes, or side effects. It mentions NSX Manager context for the target parameter, showing domain awareness, but should disclose what the operation returns.

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 comprehensively documents all 5 parameters. It adds semantic meaning beyond titles: tier0_path is explained as linking to Tier-0, route_advertisement specifies 'types,' and target explains it 'Uses default if omitted.' This effectively compensates for the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool updates an existing Tier-1 gateway and specifies it uses PATCH for partial updates. It distinguishes from siblings (create_tier1_gateway, delete_tier1_gateway) through the specific verb 'Update' and resource type, though it doesn't explicitly contrast with the similar update_segment tool.

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 usage through 'partial update,' suggesting it should be used when modifying specific fields rather than full replacement. However, it lacks explicit guidance on when to use this versus create_tier1_gateway, or prerequisites like verifying the gateway exists first.

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