describe_ecs_zones
Retrieve a detailed list of available zones for Alibaba Cloud ECS instances in a specified region using the MCP server, aiding in resource deployment planning.
Instructions
查询ECS可用区列表
Args:
region: 区域ID,如cn-beijing
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | cn-beijing |
Implementation Reference
- complete_fastmcp_server.py:65-83 (handler)The primary handler and registration for the MCP tool 'describe_ecs_zones'. Decorated with @app.tool() for FastMCP registration. Implements logic to query ECS zones by delegating to a matching tool in common_api_tools.tools (searches for 'zone' in name), with fallback message if not found or on error.@app.tool() def describe_ecs_zones(region: str = "cn-beijing") -> str: """查询ECS可用区列表 Args: region: 区域ID,如cn-beijing """ try: sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'alibaba_cloud_ops_mcp_server')) from tools import common_api_tools for tool_func in common_api_tools.tools: if hasattr(tool_func, '__name__') and 'zone' in tool_func.__name__.lower(): result = tool_func(RegionId=region) return str(result) return f"ECS可用区查询功能可用,查询region: {region}" except Exception as e: return f"ECS可用区查询失败: {str(e)}"