Skip to main content
Glama
aliyun

Alibaba Cloud RDS OpenAPI MCP Server

Official
by aliyun

modify_parameter

Modify RDS instance parameters to optimize database performance, adjust configurations, or apply parameter templates with flexible timing options.

Instructions

Modify RDS instance parameters.

Args:
    region_id: The region ID of the RDS instance.
    dbinstance_id: The ID of the RDS instance.
    parameters (Dict[str, str], optional): Parameters and their values in JSON format.
        Example: {"delayed_insert_timeout": "600", "max_length_for_sort_data": "2048"}
    parameter_group_id: Parameter template ID.
    forcerestart: Whether to force restart the database. Default: False.
    switch_time_mode: Execution time mode. Values: Immediate, MaintainTime, ScheduleTime. Default: Immediate.
    switch_time: Scheduled execution time in format: yyyy-MM-ddTHH:mm:ssZ (UTC time).
    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
parametersNo
parameter_group_idNo
forcerestartNo
switch_time_modeNoImmediate
switch_timeNo
client_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler implementation for the 'modify_parameter' MCP tool. This async function takes parameters like region_id, dbinstance_id, and a dict of parameters to modify, constructs a ModifyParameterRequest using Alibaba Cloud RDS SDK, and executes the API call via get_rds_client.
    @mcp.tool()
    async def modify_parameter(
            region_id: str,
            dbinstance_id: str,
            parameters: Dict[str, str] = None,
            parameter_group_id: str = None,
            forcerestart: bool = False,
            switch_time_mode: str = "Immediate",
            switch_time: str = None,
            client_token: str = None
    ) -> Dict[str, Any]:
        """Modify RDS instance parameters.
    
        Args:
            region_id: The region ID of the RDS instance.
            dbinstance_id: The ID of the RDS instance.
            parameters (Dict[str, str], optional): Parameters and their values in JSON format.
                Example: {"delayed_insert_timeout": "600", "max_length_for_sort_data": "2048"}
            parameter_group_id: Parameter template ID.
            forcerestart: Whether to force restart the database. Default: False.
            switch_time_mode: Execution time mode. Values: Immediate, MaintainTime, ScheduleTime. Default: Immediate.
            switch_time: Scheduled execution time in format: yyyy-MM-ddTHH:mm:ssZ (UTC time).
            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.ModifyParameterRequest(
                dbinstance_id=dbinstance_id,
                forcerestart=forcerestart,
                switch_time_mode=switch_time_mode
            )
    
            # Add optional parameters if provided
            if parameters:
                request.parameters = json.dumps(parameters)
            if parameter_group_id:
                request.parameter_group_id = parameter_group_id
            if switch_time:
                request.switch_time = switch_time
            if client_token:
                request.client_token = client_token
    
            # Make the API request
            response = client.modify_parameter(request)
            return response.body.to_map()
    
        except Exception as e:
            logger.error(f"Error occurred while modifying parameters: {str(e)}")
            raise OpenAPIError(f"Failed to modify RDS instance parameters: {str(e)}")
  • The @mcp.tool() decorator registers the 'modify_parameter' function as an MCP tool in the 'rds' group (default). Registration occurs during the activation phase in RdsMCP.activate() when the 'rds' group is enabled.
    @mcp.tool()
    async def modify_parameter(
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 only minimally addresses behavior. It mentions that 'forcerestart' can force a database restart and 'switch_time_mode' allows scheduling, but doesn't cover critical aspects like required permissions, whether changes are reversible, rate limits, or potential impacts on database availability. For a mutation tool with 8 parameters, this is inadequate.

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 well-structured with clear sections for Args and Returns, and each parameter explanation is concise. However, the initial purpose statement is brief and could be more front-loaded with context, and some parameter explanations could be slightly more streamlined.

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 (8 parameters, mutation operation) and no annotations, the description is partially complete. It excels in parameter documentation but lacks behavioral context (e.g., safety, permissions). The presence of an output schema means it doesn't need to explain return values, but overall gaps remain for a tool of this nature.

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 significant value beyond the input schema, which has 0% description coverage. It provides clear explanations for all 8 parameters, including examples (e.g., JSON format for 'parameters'), default values, and format specifications (e.g., UTC time for 'switch_time'). 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.

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 parameters', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'modify_db_instance_spec' or 'modify_db_instance_description', which would require a 5.

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_spec' or 'restart_db_instance'. The description lists parameters but doesn't explain the tool's role in the broader context of RDS instance management.

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