This Skill lets large models usecommand lineto call Alibaba Cloud RDS OpenAPI and read-only SQL capabilities, for querying/managing RDS instances.
When to Use
- When users ask about the RDS instance list, instance details, monitoring, slow logs, parameters, accounts, databases, whitelists, etc. in a region
- When users need to execute read-only SQL on an instance (such as
explain、show create table、query_sql) or view large tables/fragmentation - When users need OpenAPI operations such as creating/modifying instances, accounts, parameters, specifications, restarting, or public network connections
Prerequisites
- Installation: This package is installed (choose one)
- From the project root directory:
uv pip install -e .orpip install -e . - Or use:
uvx alibabacloud-rds-openapi-mcp-serverwhen you need to install locally first and then use thealibabacloud-rds-instances-managecommand
- From the project root directory:
- Credentials: Alibaba Cloud AK/SK environment variables must be provided
ALIBABA_CLOUD_ACCESS_KEY_IDALIBABA_CLOUD_ACCESS_KEY_SECRET- (optional)
ALIBABA_CLOUD_SECURITY_TOKEN(STS) - (optional)
MCP_TOOLSETS, defaultrds, can be set tords,rds_custom_read, etc.
Configure entries (recommended)
In platforms such as OpenClaw and Claude Code, it is recommended to configure entries for this skill in the skill's env, writing ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET into it, so that runtime does not require separately configuring environment variables, making subsequent use easier.
OpenClaw: In ~/.openclaw/openclaw.json 's skills.entries , add an item for alibabacloud-rds-instances-manage and write in env:
{
"skills": {
"entries": {
"alibabacloud-rds-instances-manage": {
"enabled": true,
"env": {
"ALIBABA_CLOUD_ACCESS_KEY_ID": "你的 AccessKey ID",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "你的 AccessKey Secret"
}
}
}
}
}
Optional: if using STS, you can add env in the same ALIBABA_CLOUD_SECURITY_TOKEN; if you need to specify a toolset, you can add MCP_TOOLSETS(such as "rds,rds_custom_read")。
Claude Code / Other Platforms: In the corresponding skill's configuration, find the "entries" or "environment variables" item, and configure the above two envs for alibabacloud-rds-instances-manage .
Standard Process
-
List available tools(if unsure of the tool names)
alibabacloud-rds-instances-manage listThe output is a JSON array, each item containing
name、description。 -
Execute tool
alibabacloud-rds-instances-manage run <工具名> '<JSON 参数>'- parameters are a JSON object, with keys being the parameter names in the tool documentation (such as
region_id、db_instance_id)。 - Example: query instances in the Hangzhou region
alibabacloud-rds-instances-manage run describe_db_instances '{"region_id":"cn-hangzhou"}' - Example: query instance details
alibabacloud-rds-instances-manage run describe_db_instance_attribute '{"region_id":"cn-hangzhou","db_instance_id":"rm-xxxxx"}' - Example: execute read-only SQL
alibabacloud-rds-instances-manage run query_sql '{"region_id":"cn-hangzhou","db_instance_id":"rm-xxxxx","db_name":"mydb","sql":"SELECT 1"}'
- parameters are a JSON object, with keys being the parameter names in the tool documentation (such as
-
Parse results
- Success: standard output is the JSON returned by the tool or a JSON wrapper of text.
- Failure: standard error is
{"error":"..."}, and the exit code is non-zero.
Common Tools Quick Reference
| Capability | Tool Name | Typical Parameters |
|---|---|---|
| Instance List | describe_db_instances |
region_id |
| Instance Details | describe_db_instance_attribute |
region_id, db_instance_id |
| Availability Zones | describe_available_zones |
region_id, engine, etc. |
| Available Specifications | describe_available_classes |
region_id, zone_id, engine, engine_version, etc. |
| Monitoring Metrics | describe_db_instance_performance / describe_monitor_metrics |
region_id, db_instance_id, time, etc. |
| Slow Logs | describe_slow_log_records |
region_id, db_instance_id, time, etc. |
| Parameters | describe_db_instance_parameters |
region_id, db_instance_id |
| Modify Parameters | modify_parameter |
region_id, dbinstance_id, parameters , etc. |
| Read-only SQL | query_sql |
region_id, db_instance_id, db_name, sql |
| Execution plan | explain_sql |
region_id, db_instance_id, db_name, sql |
| CREATE TABLE statement | show_create_table |
region_id, db_instance_id, db_name, table_name |
| Current time | get_current_time |
No parameters {} |
For the complete tool list and parameters, see tools_reference.md。
Notes
- All write operations (create/modify/restart, etc.) will actually change resources; confirm the parameters and permissions before calling.
- SQL-type tools (such as
query_sql) support read-only only; for write operations, use OpenAPI tools. - For time parameters, it is recommended to use
get_current_timeto get the current time before calculating the range.