Skip to main content
Glama
aliyun

Alibaba Cloud RDS OpenAPI MCP Server

Official
by aliyun

modify_db_instance_spec

Change RDS instance specifications to adjust compute power, storage, or payment type for scaling database performance or cost optimization.

Instructions

Modify RDS instance specifications.

Args:
    region_id: The region ID of the RDS instance.
    dbinstance_id: The ID of the RDS instance.
    dbinstance_class: Target instance specification.
    dbinstance_storage: Target storage space in GB.
    pay_type: Instance payment type. Values: Postpaid, Prepaid, Serverless.
    effective_time: When the new configuration takes effect. Values: Immediate, MaintainTime, ScheduleTime.
    switch_time: Scheduled switch time in format: yyyy-MM-ddTHH:mm:ssZ (UTC time).
    switch_time_mode: Switch time mode. Values: Immediate, MaintainTime, ScheduleTime.
    source_biz: Source business type.
    dedicated_host_group_id: Dedicated host group ID.
    zone_id: Zone ID.
    vswitch_id: VSwitch ID.
    category: Instance category.
    instance_network_type: Instance network type.
    direction: Specification change direction. Values: UP, DOWN.
    auto_pause: Whether to enable auto pause for Serverless instances.
    max_capacity: Maximum capacity for Serverless instances.
    min_capacity: Minimum capacity for Serverless instances.
    switch_force: Whether to force switch for Serverless instances.
    client_token: Client token for idempotency, max 64 ASCII characters.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_idYes
dbinstance_idYes
dbinstance_classNo
dbinstance_storageNo
pay_typeNo
effective_timeNo
switch_timeNo
switch_time_modeNo
source_bizNo
dedicated_host_group_idNo
zone_idNo
vswitch_idNo
categoryNo
instance_network_typeNo
directionNo
auto_pauseNo
max_capacityNo
min_capacityNo
switch_forceNo
client_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function that implements the 'modify_db_instance_spec' MCP tool by constructing and sending a ModifyDBInstanceSpecRequest to the Alibaba Cloud RDS SDK client.
    async def modify_db_instance_spec(
            region_id: str,
            dbinstance_id: str,
            dbinstance_class: str = None,
            dbinstance_storage: int = None,
            pay_type: str = None,
            effective_time: str = None,
            switch_time: str = None,
            switch_time_mode: str = None,
            source_biz: str = None,
            dedicated_host_group_id: str = None,
            zone_id: str = None,
            vswitch_id: str = None,
            category: str = None,
            instance_network_type: str = None,
            direction: str = None,
            auto_pause: bool = None,
            max_capacity: float = None,
            min_capacity: float = None,
            switch_force: bool = None,
            client_token: str = None
    ) -> Dict[str, Any]:
        """Modify RDS instance specifications.
    
        Args:
            region_id: The region ID of the RDS instance.
            dbinstance_id: The ID of the RDS instance.
            dbinstance_class: Target instance specification.
            dbinstance_storage: Target storage space in GB.
            pay_type: Instance payment type. Values: Postpaid, Prepaid, Serverless.
            effective_time: When the new configuration takes effect. Values: Immediate, MaintainTime, ScheduleTime.
            switch_time: Scheduled switch time in format: yyyy-MM-ddTHH:mm:ssZ (UTC time).
            switch_time_mode: Switch time mode. Values: Immediate, MaintainTime, ScheduleTime.
            source_biz: Source business type.
            dedicated_host_group_id: Dedicated host group ID.
            zone_id: Zone ID.
            vswitch_id: VSwitch ID.
            category: Instance category.
            instance_network_type: Instance network type.
            direction: Specification change direction. Values: UP, DOWN.
            auto_pause: Whether to enable auto pause for Serverless instances.
            max_capacity: Maximum capacity for Serverless instances.
            min_capacity: Minimum capacity for Serverless instances.
            switch_force: Whether to force switch for Serverless instances.
            client_token: Client token for idempotency, max 64 ASCII characters.
    
        Returns:
            Dict[str, Any]: The response containing the request ID.
        """
        try:
            # Initialize the client
            client = get_rds_client(region_id)
    
            # Create request
            request = rds_20140815_models.ModifyDBInstanceSpecRequest(
                dbinstance_id=dbinstance_id
            )
    
            # Add optional parameters if provided
            if dbinstance_class:
                request.dbinstance_class = dbinstance_class
            if dbinstance_storage:
                request.dbinstance_storage = dbinstance_storage
            if pay_type:
                request.pay_type = pay_type
            if effective_time:
                request.effective_time = effective_time
            if switch_time:
                request.switch_time = switch_time
            if switch_time_mode:
                request.switch_time_mode = switch_time_mode
            if source_biz:
                request.source_biz = source_biz
            if dedicated_host_group_id:
                request.dedicated_host_group_id = dedicated_host_group_id
            if zone_id:
                request.zone_id = zone_id
            if vswitch_id:
                request.vswitch_id = vswitch_id
            if category:
                request.category = category
            if instance_network_type:
                request.instance_network_type = instance_network_type
            if direction:
                request.direction = direction
            if auto_pause is not None:
                request.auto_pause = auto_pause
            if max_capacity:
                request.max_capacity = max_capacity
            if min_capacity:
                request.min_capacity = min_capacity
            if switch_force is not None:
                request.switch_force = switch_force
            if client_token:
                request.client_token = client_token
    
            # Make the API request
            response = client.modify_dbinstance_spec(request)
            return response.body.to_map()
    
        except Exception as e:
            logger.error(f"Error occurred while modifying instance specifications: {str(e)}")
            raise OpenAPIError(f"Failed to modify RDS instance specifications: {str(e)}")
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 tool modifies specifications, implying a mutation, but doesn't mention critical behaviors like whether the modification is reversible, requires downtime, has rate limits, or specific authentication needs. The return value is briefly noted but lacks detail on error handling or response structure.

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

Conciseness3/5

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

The description is appropriately front-loaded with a clear purpose statement, but the extensive parameter list makes it lengthy. While each parameter entry is necessary given the lack of schema descriptions, the structure could be improved by grouping related parameters or adding brief usage notes to enhance readability.

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 high complexity (20 parameters, no annotations, 0% schema coverage), the description is partially complete. It excels in parameter semantics but lacks behavioral context, usage guidelines, and output details beyond a generic return statement. The output schema exists, so return values needn't be explained, but other gaps remain.

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 schema description coverage is 0%, so the description must compensate fully. It provides detailed semantics for all 20 parameters, including explanations, value examples (e.g., 'Postpaid, Prepaid, Serverless' for pay_type), and formats (e.g., 'yyyy-MM-ddTHH:mm:ssZ' for switch_time), adding significant meaning beyond the bare schema.

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 ('Modify') and resource ('RDS instance specifications'), making the purpose explicit. However, it doesn't differentiate from sibling tools like 'modify_db_instance_description' or 'modify_parameter', which also modify aspects of RDS instances, so it doesn't fully distinguish from alternatives.

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 like 'modify_db_instance_description' or 'modify_parameter'. The description lists parameters but doesn't explain the context or prerequisites for invoking this tool, such as instance state requirements or permission needs.

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