ecs_start_instance
Start a stopped Alibaba Cloud ECS instance by providing its instance ID. This tool powers on the specified instance to resume operations.
Instructions
Start an Alibaba Cloud ECS instance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instanceId | Yes | The ID of the instance to start. |
Implementation Reference
- src/tools/ecs/index.ts:69-82 (handler)Handles the 'ecs_start_instance' tool logic: parses the instanceId argument, calls the Alibaba Cloud ECS StartInstance API, and returns the result.
if (name === "ecs_start_instance") { const parsed = z.object({ instanceId: z.string() }).parse(args); const params = { InstanceId: parsed.instanceId }; const result = await client.request('StartInstance', params, requestOption); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } - src/tools/ecs/index.ts:25-37 (schema)Defines the 'ecs_start_instance' tool registration including its name, description, and input schema (requires instanceId string).
name: "ecs_start_instance", description: "Start an Alibaba Cloud ECS instance.", inputSchema: { type: "object", properties: { instanceId: { type: "string", description: "The ID of the instance to start." } }, required: ["instanceId"] } } - src/index.ts:30-43 (registration)Registers all ECS tools (including 'ecs_start_instance') via registerEcsTools() in the ListToolsRequestSchema handler.
// Register Tools server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ ...registerUniversalTool(), ...registerEcsTools(), ...registerVpcTools(), ...registerRdsTools(), ...registerRamTools(), ...registerAckTools(), ...registerSlbTools() ], }; }); - src/index.ts:54-56 (registration)Routes call requests with names starting with 'ecs_' to handleEcsTools(), which processes 'ecs_start_instance'.
if (name.startsWith("ecs_")) { return await handleEcsTools(name, args); }