Skip to main content
Glama
aliyun

Alibaba Cloud RDS OpenAPI MCP Server

Official
by aliyun

restart_db_instance

Restart an Alibaba Cloud RDS database instance immediately, during maintenance, or at a scheduled time to apply configuration changes or resolve issues.

Instructions

Restart an RDS instance.

Args:
    region_id (str): The region ID of the RDS instance.
    dbinstance_id (str): The ID of the RDS instance.
    effective_time (str, optional): When to restart the instance. Options:
        - Immediate: Restart immediately
        - MaintainTime: Restart during maintenance window
        - ScheduleTime: Restart at specified time
        Default: Immediate
    switch_time (str, optional): The scheduled restart time in format: yyyy-MM-ddTHH:mm:ssZ (UTC time).
        Required when effective_time is ScheduleTime.
    client_token (str, optional): Idempotency token, max 64 ASCII characters.

Returns:
    Dict[str, Any]: Response containing the request ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_idYes
dbinstance_idYes
effective_timeNoImmediate
switch_timeNo
client_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function that implements the 'restart_db_instance' tool by calling the Alibaba Cloud RDS 'RestartDBInstance' API via the SDK.
    async def restart_db_instance(
            region_id: str,
            dbinstance_id: str,
            effective_time: str = "Immediate",
            switch_time: str = None,
            client_token: str = None
    ) -> Dict[str, Any]:
        """Restart an RDS instance.
    
        Args:
            region_id (str): The region ID of the RDS instance.
            dbinstance_id (str): The ID of the RDS instance.
            effective_time (str, optional): When to restart the instance. Options:
                - Immediate: Restart immediately
                - MaintainTime: Restart during maintenance window
                - ScheduleTime: Restart at specified time
                Default: Immediate
            switch_time (str, optional): The scheduled restart time in format: yyyy-MM-ddTHH:mm:ssZ (UTC time).
                Required when effective_time is ScheduleTime.
            client_token (str, optional): Idempotency token, max 64 ASCII characters.
    
        Returns:
            Dict[str, Any]: Response containing the request ID.
        """
        try:
            # Initialize client
            client = get_rds_client(region_id)
    
            # Create request
            request = rds_20140815_models.RestartDBInstanceRequest(
                dbinstance_id=dbinstance_id
            )
    
            # Add optional parameters
            if effective_time:
                request.effective_time = effective_time
            if switch_time:
                request.switch_time = switch_time
            if client_token:
                request.client_token = client_token
    
            # Make the API request
            response = client.restart_dbinstance(request)
            return response.body.to_map()
    
        except Exception as e:
            logger.error(f"Error occurred while restarting instance: {str(e)}")
            raise OpenAPIError(f"Failed to restart RDS instance: {str(e)}")
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It mentions the restart timing options but doesn't disclose critical traits like whether this causes downtime, requires specific permissions, has rate limits, or what happens to connections. The return value is mentioned but not explained.

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?

Well-structured with purpose statement followed by parameter documentation. The Args and Returns sections are organized efficiently. Slightly verbose in listing all effective_time options explicitly, but each sentence adds value. Could be more front-loaded with critical behavioral information.

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?

For a destructive operation with 5 parameters and no annotations, the description is moderately complete. It thoroughly documents parameters and mentions the return type, but lacks critical context about the restart's impact (downtime, connection handling), permissions required, or error conditions. The output schema exists but isn't described in detail.

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

Parameters5/5

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

The description adds substantial meaning beyond the 0% schema coverage. It explains all 5 parameters with clear semantics: region_id and dbinstance_id as identifiers, effective_time with its enum options and default, switch_time's format and dependency, and client_token's purpose and constraints. This fully compensates for the schema's lack of descriptions.

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

Purpose5/5

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

The description clearly states the specific action ('Restart') and target resource ('an RDS instance'), distinguishing it from sibling tools like 'modify_db_instance_spec' or 'create_db_instance'. The verb+resource combination is precise and unambiguous.

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. While the purpose is clear, there's no mention of prerequisites (e.g., instance must be running), consequences (e.g., downtime), or comparison to related tools like 'modify_db_instance_spec' for configuration changes.

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/aliyun/alibabacloud-rds-openapi-mcp-server'

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