Skip to main content
Glama
aliyun

Alibaba Cloud RDS OpenAPI MCP Server

Official
by aliyun

show_create_table

Read-only

Retrieve the CREATE TABLE SQL statement for a specific table in an Alibaba Cloud RDS database to understand its structure and schema.

Instructions

show create table db_name.table_name
Args:
    dbinstance_id (str): The ID of the RDS instance.
    region_id(str): the region id of instance.
    db_name(str): the db name for table.
    table_name(str): the table name.
Returns:
    the sql result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_idYes
dbinstance_idYes
db_nameYes
table_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for 'show_create_table'. It uses DBService to connect to an Alibaba Cloud RDS instance (specified by region_id and dbinstance_id) and the given database (db_name), then executes the MySQL SQL command 'SHOW CREATE TABLE db_name.table_name' to retrieve and return the CREATE TABLE statement for the specified table.
    @mcp.tool(annotations=READ_ONLY_TOOL)
    async def show_create_table(
            region_id: str,
            dbinstance_id: str,
            db_name: str,
            table_name: str
    ) -> str:
        """
        show create table db_name.table_name
        Args:
            dbinstance_id (str): The ID of the RDS instance.
            region_id(str): the region id of instance.
            db_name(str): the db name for table.
            table_name(str): the table name.
        Returns:
            the sql result.
        """
        try:
            async with DBService(region_id, dbinstance_id, db_name) as service:
                return await service.execute_sql(f"show create table {db_name}.{table_name}")
        except Exception as e:
            logger.error(f"Error occurred: {str(e)}")
            raise e
Behavior3/5

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

The annotations provide readOnlyHint=true, indicating this is a safe read operation. The description adds minimal behavioral context beyond this - it mentions 'the sql result' as return value but doesn't specify format, potential errors, or that this executes a SHOW CREATE TABLE command. No contradiction with annotations exists, but the description doesn't enrich the behavioral understanding significantly.

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 but poorly structured. It starts with what appears to be a command syntax, then lists parameters with redundant information, and ends with a vague return statement. While concise, it lacks effective front-loading of key information and contains wasted space with parameter listings that don't add value beyond the schema.

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 has readOnlyHint annotation and an output schema exists, the description is minimally adequate. However, for a database schema retrieval tool with 4 parameters and 0% schema description coverage, it should provide more context about what the tool actually does, what the SQL result contains, and how it differs from related database inspection tools.

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 schema provides only parameter names and types without descriptions. The description lists parameters but adds minimal semantics - it repeats parameter names with brief, unhelpful phrases like 'the db name for table' and 'the table name' without explaining their purpose, format requirements, or relationships. This doesn't adequately compensate 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.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'show create table db_name.table_name' which indicates the tool displays SQL CREATE TABLE statements, but it's vague about the exact purpose. It doesn't specify this is for retrieving table schema definitions from an RDS instance, nor does it distinguish from sibling tools like describe_db_instance_databases or explain_sql that might provide related database information.

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. The description doesn't mention prerequisites, appropriate contexts, or compare it to sibling tools like describe_db_instance_databases or explain_sql that might serve similar purposes. The agent must infer usage from the tool name alone.

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