Skip to main content
Glama
aliyun

Alibaba Cloud RDS OpenAPI MCP Server

Official
by aliyun

allocate_instance_public_connection

Assign a public connection endpoint to an Alibaba Cloud RDS database instance, enabling external access with a specified connection string prefix.

Instructions

allocate db instance public connection.
Args:
    region_id: The region ID of the RDS instance.
    db_instance_id: The ID of the RDS instance.
    connection_string_prefix: The prefix of connection string.
Returns:
    dict[str, Any]: The response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_idYes
db_instance_idYes
connection_string_prefixNo
portNo3306

Implementation Reference

  • The main handler function for the 'allocate_instance_public_connection' tool. It allocates a public network connection to the specified RDS instance using the Alibaba Cloud RDS SDK.
    async def allocate_instance_public_connection(
            region_id: str,
            db_instance_id: str,
            connection_string_prefix: str = None,
            port: str = '3306'
    ):
        """
        allocate db instance public connection.
        Args:
            region_id: The region ID of the RDS instance.
            db_instance_id: The ID of the RDS instance.
            connection_string_prefix: The prefix of connection string.
        Returns:
            dict[str, Any]: The response.
        """
        try:
            if connection_string_prefix is None:
                connection_string_prefix = db_instance_id + "-public"
            client = get_rds_client(region_id)
            request = rds_20140815_models.AllocateInstancePublicConnectionRequest(
                dbinstance_id=db_instance_id,
                connection_string_prefix=connection_string_prefix,
                port=port
            )
            response = await client.allocate_instance_public_connection_async(request)
            return response.body.to_map()
        except Exception as e:
            raise 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 action ('allocate') but doesn't explain what this entails—e.g., whether it creates a new public endpoint, modifies existing settings, requires specific permissions, has side effects like downtime, or involves costs. This is inadequate for a mutation tool with zero annotation coverage.

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 brief and front-loaded with the core purpose, but the 'Args' and 'Returns' sections are redundant with the schema (though schema coverage is 0%). The structure is clear, but some sentences (like the return statement) could be omitted if they don't add value beyond what's implied by the tool name.

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 (a mutation tool for database instances), lack of annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't cover behavioral aspects (e.g., effects, errors), parameter details (e.g., port usage), or output expectations, making it insufficient 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.

Parameters2/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 lists three parameters (region_id, db_instance_id, connection_string_prefix) but omits 'port', which is in the schema. For the listed parameters, it adds minimal semantics (e.g., 'prefix of connection string'), but doesn't explain formats, constraints, or how they interact. This partially compensates but leaves significant gaps.

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 ('allocate') and resource ('db instance public connection'), which is specific and unambiguous. However, it doesn't differentiate this tool from sibling tools like 'describe_db_instance_net_info' or 'modify_security_ips', which might also relate to network connectivity, so it doesn't fully achieve sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., instance must be running), exclusions (e.g., not for private connections), or refer to sibling tools like 'describe_db_instance_net_info' for checking current connections. This leaves the agent with minimal context for tool selection.

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