Skip to main content
Glama
aliyun

AlibabaCloud MCP Server

Official
by aliyun

RebootRDSInstances

Restart multiple AlibabaCloud RDS instances simultaneously to manage and resolve performance issues efficiently. Ideal for bulk instance maintenance and optimization.

Instructions

批量重启RDS实例,适用于需要同时管理和重启多台RDS实例的场景。

Input Schema

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

Implementation Reference

  • The handler function for the 'OOS_RebootRDSInstances' tool, which reboots multiple Alibaba Cloud RDS instances using OOS execution template 'ACS-RDS-BulkyRestartInstances'. Includes input schema via Pydantic Fields.
    @tools.append
    def OOS_RebootRDSInstances(
        InstanceIds: List[str] = Field(description='AlibabaCloud RDS instance ID List'),
        RegionId: str = Field(description='AlibabaCloud region ID', default='cn-hangzhou')
    ):
        """批量重启RDS实例,适用于需要同时管理和重启多台RDS实例的场景。"""
    
        parameters = {
            'regionId': RegionId,
            'resourceType': 'ALIYUN::RDS::Instance',
            'targets': {
                'ResourceIds': InstanceIds,
                'RegionId': RegionId,
                'Type': 'ResourceIds'
            }
        }
        return _start_execution_sync(region_id=RegionId, template_name='ACS-RDS-BulkyRestartInstances',
                                     parameters=parameters)
  • Registration of all OOS tools, including 'OOS_RebootRDSInstances', into the FastMCP server using mcp.tool().
    for tool in oos_tools.tools:
        mcp.tool(tool)
  • Helper function that starts an OOS execution and polls until completion or failure, used by all OOS tools including RebootRDSInstances.
    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
  • Helper function to create OOS client configured for the given region.
    def create_client(region_id: str) -> oos20190601Client:
        config = create_config()
        config.endpoint = f'oos.{region_id}.aliyuncs.com'
        return oos20190601Client(config)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions batch restarting but does not cover critical aspects such as whether this operation is destructive (likely yes, as rebooting disrupts service), required permissions, rate limits, or what happens during the reboot process. This leaves significant gaps for an agent to understand the tool's behavior.

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 a single, efficient sentence in Chinese that front-loads the core purpose ('批量重启RDS实例') and adds context. It avoids redundancy and wastes no words, though it could be slightly more structured for clarity.

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?

Given the complexity of a batch restart operation, no annotations, and no output schema, the description is incomplete. It fails to address behavioral traits (e.g., destructiveness, permissions), output expectations, or error handling, which are crucial for an agent to use this tool effectively in a production environment.

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 schema description coverage is 100%, with clear descriptions for both parameters (InstanceIds and RegionId). The description adds no additional parameter semantics beyond what the schema provides, such as format details or constraints. According to the rules, with high schema coverage (>80%), the baseline score is 3, as the schema adequately documents the parameters.

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 ('批量重启' meaning 'batch restart') and resource ('RDS实例' meaning 'RDS instances'), which is specific and unambiguous. However, it does not explicitly differentiate from sibling tools like 'RebootInstances' or 'StartRDSInstances', though the focus on RDS instances implies some distinction.

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 implied usage context by stating it's for scenarios requiring simultaneous management and restart of multiple RDS instances. However, it lacks explicit guidance on when to use this tool versus alternatives like 'RebootInstances' (for non-RDS instances) or 'StartRDSInstances' (for starting rather than restarting), and does not mention prerequisites or exclusions.

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