Skip to main content
Glama
aliyun

Alibaba Cloud RDS OpenAPI MCP Server

Official
by aliyun

describe_db_instance_accounts

Read-only

Retrieve account information for multiple Alibaba Cloud RDS database instances in a single operation to manage access and permissions.

Instructions

Batch retrieves account information for multiple RDS instances.
Args:
    region_id: The region ID of the RDS instance.
    db_instance_ids: List of DB instance identifiers (e.g., ["rm-uf6wjk5****", "db-instance-01"])
Returns:
    list[dict]: A list of dictionaries containing account information for each instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_idYes
db_instance_idsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core handler function for the 'describe_db_instance_accounts' MCP tool. It batches calls to the Alibaba Cloud RDS 'DescribeAccounts' API to retrieve account details (e.g., privileges, status) for multiple DBInstanceIds in a given region.
    @mcp.tool(annotations=READ_ONLY_TOOL)
    async def describe_db_instance_accounts(
            region_id: str,
            db_instance_ids: list[str]
    ) -> list[dict]:
        """
        Batch retrieves account information for multiple RDS instances.
        Args:
            region_id: The region ID of the RDS instance.
            db_instance_ids: List of DB instance identifiers (e.g., ["rm-uf6wjk5****", "db-instance-01"])
        Returns:
            list[dict]: A list of dictionaries containing account information for each instance.
        """
        try:
            client = get_rds_client(region_id)
            db_instance_accounts = []
            for db_instance_id in db_instance_ids:
                request = rds_20140815_models.DescribeAccountsRequest(
                    dbinstance_id=db_instance_id
                )
                response = await client.describe_accounts_async(request)
                db_instance_accounts.append(response.body.to_map())
            return db_instance_accounts
        except Exception as e:
            raise e
Behavior3/5

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

The annotation 'readOnlyHint: true' already indicates this is a safe read operation. The description adds value by specifying it's a batch operation ('multiple RDS instances') and mentions the return type ('list[dict]'), which provides useful context beyond the annotation. However, it doesn't disclose other behavioral traits like rate limits, error handling, or authentication requirements, keeping the score moderate.

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

Conciseness5/5

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

The description is front-loaded with the core purpose in the first sentence, followed by clear sections for Args and Returns. Each sentence earns its place by providing essential information without redundancy. The structure is efficient and easy to parse, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, batch operation), the description is reasonably complete. It explains the purpose, parameters, and return value. With annotations covering safety and an output schema implied by the Returns section, key aspects are addressed. However, it lacks usage guidelines and deeper behavioral context, preventing a perfect score.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates well by explaining both parameters: 'region_id' as 'The region ID of the RDS instance' and 'db_instance_ids' with an example list format. This adds meaningful semantics beyond the bare schema. It doesn't cover all possible nuances (e.g., valid region formats), but it's sufficient for basic understanding.

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 tool's purpose: 'Batch retrieves account information for multiple RDS instances.' It specifies the verb ('retrieves'), resource ('account information'), and scope ('multiple RDS instances'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'describe_db_instance_attribute' or 'describe_db_instances', which prevents a perfect score.

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, such as needing specific permissions or valid instance IDs, or compare it to sibling tools like 'describe_db_instances' (which might list instances) or 'create_db_instance_account' (which creates accounts). This lack of context leaves the agent guessing about appropriate usage scenarios.

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