Skip to main content
Glama
aliyun

AlibabaCloud MCP Server

Official
by aliyun

StartInstances

Initiate the startup of multiple Alibaba Cloud ECS instances simultaneously to streamline application deployment and enhance system availability in high-demand scenarios.

Instructions

批量启动ECS实例,适用于需要同时管理和启动多台ECS实例的场景,例如应用部署和高可用性场景。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
InstanceIdsYesAlibabaCloud ECS instance ID List
RegionIdNoAlibabaCloud region IDcn-hangzhou

Implementation Reference

  • The handler function for the 'OOS_StartInstances' tool, which orchestrates the bulk start of ECS instances using the OOS template 'ACS-ECS-BulkyStartInstances'.
    @tools.append
    def OOS_StartInstances(
        InstanceIds: List[str] = Field(description='AlibabaCloud ECS instance ID List'),
        RegionId: str = Field(description='AlibabaCloud region ID', default='cn-hangzhou'),
    ):
        """批量启动ECS实例,适用于需要同时管理和启动多台ECS实例的场景,例如应用部署和高可用性场景。"""
        
        parameters = {
            'regionId': RegionId,
            'resourceType': 'ALIYUN::ECS::Instance',
            'targets': {
                'ResourceIds': InstanceIds,
                'RegionId': RegionId,
                'Type': 'ResourceIds'
            }
        }
        return _start_execution_sync(region_id=RegionId, template_name='ACS-ECS-BulkyStartInstances', parameters=parameters)
  • Registration of all OOS tools, including 'OOS_StartInstances', to the FastMCP server instance.
    for tool in oos_tools.tools:
        mcp.tool(tool)
  • Helper function that starts an OOS execution and polls synchronously until completion or failure.
    def _start_execution_sync(region_id: str, template_name: str, parameters: dict):
        client = create_client(region_id=region_id)
        start_execution_request = oos_20190601_models.StartExecutionRequest(
            region_id=region_id,
            template_name=template_name,
            parameters=json.dumps(parameters)
        )
        start_execution_resp = client.start_execution(start_execution_request)
        execution_id = start_execution_resp.body.execution.execution_id
    
        while True:
            list_executions_request = oos_20190601_models.ListExecutionsRequest(
                region_id=region_id,
                execution_id=execution_id
            )
            list_executions_resp = client.list_executions(list_executions_request)
            status = list_executions_resp.body.executions[0].status
            if status == FAILED:
                status_message = list_executions_resp.body.executions[0].status_message
                raise exception.OOSExecutionFailed(reason=status_message)
            elif status in END_STATUSES:
                return list_executions_resp.body
            time.sleep(1)
    @tools.append
  • Pydantic schema definitions for the input parameters of the StartInstances tool.
    InstanceIds: List[str] = Field(description='AlibabaCloud ECS instance ID List'),
    RegionId: str = Field(description='AlibabaCloud region ID', default='cn-hangzhou'),
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While it mentions this is for batch operations and gives usage scenarios, it doesn't disclose important behavioral aspects: whether this requires specific permissions, what happens if some instances fail to start, whether there are rate limits, what the expected response looks like, or whether this operation is idempotent. For a mutation tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two clear sentences. The first sentence states the core functionality, and the second provides usage context. There's no wasted verbiage or unnecessary repetition. However, it could be slightly more front-loaded by making the batch nature more prominent earlier.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, what error conditions might occur, or important behavioral constraints. Given that this performs a potentially significant operation (starting cloud instances), more contextual information about permissions, idempotency, and failure modes would be valuable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description doesn't mention any parameters directly, but with 100% schema description coverage, the schema already documents both parameters (InstanceIds and RegionId) adequately. The description's mention of '批量' (batch) operation aligns with the InstanceIds array parameter, but adds minimal semantic value beyond what the schema provides. The baseline of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('批量启动' - batch start) and resource ('ECS实例' - ECS instances), making the purpose immediately understandable. It distinguishes from siblings like StopInstances and RebootInstances by focusing on starting rather than stopping or restarting. However, it doesn't explicitly differentiate from StartRDSInstances (which starts RDS instances rather than ECS instances).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides usage context with examples ('应用部署和高可用性场景' - application deployment and high availability scenarios), which helps understand when this tool might be appropriate. However, it doesn't explicitly state when NOT to use this tool or mention clear alternatives like RunInstances (for creating and starting new instances) or RebootInstances (for restarting already running instances).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aliyun/alibaba-cloud-ops-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server