get_subnet
Retrieve detailed subnet configuration including IP pools, DHCP settings, and virtual switch assignment for a specified subnet UUID.
Instructions
Get detailed subnet configuration including IP pools, DHCP config, and virtual switch assignment.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subnet_uuid | Yes | The UUID (extId) of the subnet |
Implementation Reference
- Input schema for the get_subnet tool: requires a subnet_uuid string parameter.
{ "name": "get_subnet", "description": ( "Get detailed subnet configuration including IP pools, DHCP config, " "and virtual switch assignment." ), "inputSchema": { "type": "object", "properties": { "subnet_uuid": { "type": "string", "description": "The UUID (extId) of the subnet", }, }, "required": ["subnet_uuid"], }, }, - Handler function that calls the Nutanix v4 networking API to fetch subnet details by UUID.
async def handle_get_subnet( client: NutanixClient, arguments: dict[str, Any] ) -> dict[str, Any]: """Get subnet details using v4 networking API.""" subnet_uuid = arguments["subnet_uuid"] result = await client.v4_get( namespace="networking", path=f"config/subnets/{subnet_uuid}", ) return result.get("data", result) - src/nutanix_mcp/tools/networking.py:292-299 (registration)Registration of handle_get_subnet in the NETWORKING_HANDLERS dispatch table.
NETWORKING_HANDLERS: dict[str, Any] = { "list_subnets": handle_list_subnets, "get_subnet": handle_get_subnet, "list_images": handle_list_images, "get_image": handle_get_image, "list_categories": handle_list_categories, "get_category": handle_get_category, } - src/nutanix_mcp/tools/__init__.py:10-12 (registration)Aggregation of all tool definitions including get_subnet (from NETWORKING_TOOLS) into a single list for MCP registration.
def get_all_tools() -> list[dict]: """Return all registered tool definitions.""" return VM_TOOLS + CLUSTER_TOOLS + PE_TOOLS + REPORT_TOOLS + NETWORKING_TOOLS - src/nutanix_mcp/server.py:35-41 (registration)Merging NETWORKING_HANDLERS into ALL_HANDLERS, which is used by the call_tool handler to dispatch tool requests.
ALL_HANDLERS: dict[str, Any] = { **VM_HANDLERS, **CLUSTER_HANDLERS, **PE_HANDLERS, **REPORT_HANDLERS, **NETWORKING_HANDLERS, }