describe_vpcs
Retrieve a list of VPCs within a specified region using the tool on the Alibaba Cloud Operations MCP Server. Simplifies querying VPC details for efficient cloud management.
Instructions
查询VPC列表
Args:
region: 区域ID,如cn-beijing
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | cn-beijing |
Input Schema (JSON Schema)
{
"properties": {
"region": {
"default": "cn-beijing",
"title": "Region",
"type": "string"
}
},
"title": "describe_vpcsArguments",
"type": "object"
}
Implementation Reference
- complete_fastmcp_server.py:165-184 (handler)The primary MCP tool handler for 'describe_vpcs'. It imports common_api_tools and attempts to invoke a tool with 'vpc' in its name, passing RegionId. Falls back to a status message if not found or on error.@app.tool() def describe_vpcs(region: str = "cn-beijing") -> str: """查询VPC列表 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 'vpc' in tool_func.__name__.lower(): result = tool_func(RegionId=region) return str(result) return f"VPC查询功能可用,查询region: {region}" except Exception as e: return f"VPC查询失败: {str(e)}"
- alibaba_cloud_ops_mcp_server/config.py:18-21 (registration)Configuration listing 'DescribeVpcs' as a registered API for the 'Vpc' service, likely used to dynamically generate or support the underlying API call.'Vpc': [ 'DescribeVpcs', 'DescribeVSwitches' ],