Skip to main content
Glama
RadiumGu

Alibaba Cloud Operations MCP Server

by RadiumGu

start_ecs_instances

Start Alibaba Cloud ECS instances in a specified region using instance IDs to resume computing operations.

Instructions

启动ECS实例

Args:
    region: 区域ID,如cn-beijing
    instance_ids: ECS实例ID列表

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNocn-beijing
instance_idsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the 'start_ecs_instances' MCP tool, decorated with @app.tool(). It dynamically selects and invokes the appropriate OOS tool function from oos_tools.tools based on name keywords 'start' and 'instance'.
    @app.tool()
    def start_ecs_instances(region: str = "cn-beijing", instance_ids: List[str] = None) -> str:
        """启动ECS实例
        
        Args:
            region: 区域ID,如cn-beijing
            instance_ids: ECS实例ID列表
        """
        try:
            sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'alibaba_cloud_ops_mcp_server'))
            from tools import oos_tools
            
            if not instance_ids:
                return "请提供ECS实例ID列表"
            
            for tool_func in oos_tools.tools:
                if hasattr(tool_func, '__name__') and 'start' in tool_func.__name__.lower() and 'instance' in tool_func.__name__.lower():
                    result = tool_func(RegionId=region, InstanceIds=instance_ids)
                    return str(result)
            
            return f"ECS实例启动功能可用,region: {region}, 实例: {instance_ids}"
        except Exception as e:
            return f"ECS实例启动失败: {str(e)}"
  • Core helper function OOS_StartInstances invoked by the handler. Uses Alibaba Cloud OOS (Operation Orchestration Service) to execute the 'ACS-ECS-BulkyStartInstances' template for batch starting ECS instances.
    @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)
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. It states the action ('启动') but lacks details on permissions required, rate limits, whether it's idempotent, what happens if instances are already running, or error conditions. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 sized and front-loaded, with the purpose stated first followed by parameter details. Every sentence adds value: the first defines the action, and the second explains parameters. However, the structure could be improved by separating purpose and parameters more clearly, and it's slightly verbose in the parameter explanations.

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

Completeness3/5

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

Given the tool's complexity (mutation with 2 parameters), no annotations, and an output schema (which reduces need to describe returns), the description is minimally adequate. It covers the basic action and parameters but lacks behavioral context, usage guidelines, and detailed parameter semantics, making it incomplete for safe and effective use by an agent.

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?

Schema description coverage is 0%, so the description must compensate. It adds basic semantics by explaining 'region' as a region ID with an example ('cn-beijing') and 'instance_ids' as a list of ECS instance IDs. However, it doesn't clarify format constraints (e.g., ID patterns), optionality, or interactions between parameters, leaving gaps despite the low schema coverage.

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 verb ('启动' meaning 'start') and resource ('ECS实例' meaning 'ECS instances'), making the purpose immediately understandable. It distinguishes from siblings like 'stop_ecs_instances' and 'reboot_ecs_instances' by specifying the start action. However, it doesn't explicitly mention what 'start' entails (e.g., powering on virtual machines), keeping it from a perfect score.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., instances must be stopped), compare to siblings like 'reboot_ecs_instances' or 'describe_ecs_instances', or specify use cases (e.g., resuming workloads). The absence of such context leaves the agent without direction on appropriate usage scenarios.

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

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/RadiumGu/alicloud-ops-mcp'

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