vpc_list
List Virtual Private Clouds (VPCs) in a specified region, with optional page size control for paginated results.
Instructions
List Virtual Private Clouds (VPCs).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "vpc_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| regionId | No | ||
| pageSize | No |
Implementation Reference
- src/tools/vpc/index.ts:45-52 (handler)Handler logic for vpc_list: calls DescribeVpcs API via Alibaba Cloud SDK with regionId and pageSize parameters.
if (name === "vpc_list") { const parsed = z.object({ regionId: z.string().default(config.ALIBABA_CLOUD_REGION_ID), pageSize: z.number().default(10) }).parse(args); return { content: [{ type: "text", text: JSON.stringify(await client.request('DescribeVpcs', { RegionId: parsed.regionId, PageSize: parsed.pageSize }, requestOption), null, 2) }] }; } - src/tools/vpc/index.ts:10-16 (schema)Input schema for vpc_list: defines regionId (string) and pageSize (number) as optional parameters.
inputSchema: { type: "object", properties: { regionId: { type: "string" }, pageSize: { type: "number" } } } - src/tools/vpc/index.ts:5-31 (registration)Registration function registerVpcTools() that returns the tool definition array including vpc_list.
export function registerVpcTools() { return [ { name: "vpc_list", description: "List Virtual Private Clouds (VPCs).", inputSchema: { type: "object", properties: { regionId: { type: "string" }, pageSize: { type: "number" } } } }, { name: "vpc_create", description: "Create a Virtual Private Cloud (VPC).", inputSchema: { type: "object", properties: { regionId: { type: "string" }, cidrBlock: { type: "string", description: "e.g. 192.168.0.0/16" }, vpcName: { type: "string" } }, required: ["cidrBlock"] } } ]; - src/index.ts:31-42 (registration)Server registration: registerVpcTools() is spread into the tools array for the ListToolsRequestSchema handler.
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ ...registerUniversalTool(), ...registerEcsTools(), ...registerVpcTools(), ...registerRdsTools(), ...registerRamTools(), ...registerAckTools(), ...registerSlbTools() ], }; - src/index.ts:57-58 (registration)Routing: tools starting with 'vpc_' (including vpc_list) are dispatched to handleVpcTools.
if (name.startsWith("vpc_")) { return await handleVpcTools(name, args);