Skip to main content
Glama
aliyun

Alibaba Cloud DMS MCP Server

Official
by aliyun

getTableDetailInfo

Read-only

Retrieve detailed metadata about database tables including schema and index information to understand table structure and relationships.

Instructions

Retrieve detailed metadata information about a specific database table including schema and index details. If you don't know the table_guid parameter, retrieve it using listTables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_guidYesUnique table identifier (format: dmsTableId.schemaName.tableName),Example: IDB_1567890.mySchema.myTable

Implementation Reference

  • The handler function that implements the getTableDetailInfo tool by calling the Alibaba Cloud DMS API to fetch table metadata including columns and indexes.
    async def get_meta_table_detail_info(
            table_guid: str = Field(
                description="Unique table identifier (format: dmsTableId.schemaName.tableName),Example: IDB_1567890.mySchema.myTable")
    ) -> TableDetail:
        client = create_client()
        req = dms_enterprise_20181101_models.GetMetaTableDetailInfoRequest(table_guid=table_guid)
        if mcp.state.real_login_uid:
            req.real_login_user_uid = mcp.state.real_login_uid
        try:
            resp = client.get_meta_table_detail_info(req)
            detail_info = resp.body.to_map().get('DetailInfo', {}) if resp and resp.body else {}
            return TableDetail(**detail_info)
        except Exception as e:
            logger.error(f"Error in get_meta_table_detail_info: {e}")
            raise
  • Pydantic models defining the structure of the table detail response, including Column, Index, and TableDetail.
    class Column(MyBaseModel):
        ColumnName: Any = Field(description="Name of the column")
        ColumnType: Any = Field(description="Full SQL type declaration (e.g., 'varchar(32)', 'bigint(20)')")
        AutoIncrement: Any = Field(description="Whether the column is an auto-increment field")
        Description: Any = Field(description="Column comment/description text")
        Nullable: Any = Field(description="Whether NULL values are allowed")
    
    
    class Index(MyBaseModel):
        IndexColumns: Any = Field(description="List of column names included in the index")
        IndexName: Any = Field(description="Name of the index")
        IndexType: Any = Field(description="Type of index ('Primary', 'Unique', etc.)")
        Unique: Any = Field(description="Whether the index enforces uniqueness")
    
    
    class TableDetail(MyBaseModel):
        ColumnList: Any = Field(description="List of column metadata", default=None)
        IndexList: Any = Field(description="List of index metadata", default=None)
  • Tool registration in the full toolset mode.
    self.mcp.tool(name="getTableDetailInfo",
                  description="Retrieve detailed metadata information about a specific database table including "
                              "schema and index details. If you don't know the table_guid parameter, retrieve it using listTables.",
                  annotations={"title": "获取DMS表详细信息", "readOnlyHint": True})(get_meta_table_detail_info)
  • Tool registration in the configured database toolset mode.
    self.mcp.tool(name="getTableDetailInfo",
                  description="Retrieve detailed metadata information about a specific database table including "
                              "schema and index details. If you don't know the table_guid parameter, retrieve it using listTables.",
                  annotations={"title": "Get Table Details", "readOnlyHint": True})(get_meta_table_detail_info)
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the agent knows this is a safe read operation. The description adds useful context about what information is retrieved (metadata, schema, index details) and the prerequisite relationship with listTables, but doesn't provide additional behavioral details like rate limits, authentication needs, or response format.

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 perfectly concise with two sentences that each serve distinct purposes: the first explains what the tool does, the second provides usage guidance. There's no wasted language or redundancy.

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?

For a single-parameter read operation with good annotations and schema coverage, the description provides adequate context about purpose and usage. However, without an output schema, it doesn't describe what the return value looks like (e.g., structure of the metadata).

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

Parameters3/5

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

Schema description coverage is 100%, with the parameter fully documented in the schema (including format and example). The description adds no additional parameter information beyond what's in the schema, but references the parameter indirectly by suggesting how to obtain its value via listTables.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

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

The description clearly states the specific action ('Retrieve detailed metadata information') and resource ('specific database table'), including what information is retrieved ('schema and index details'). It distinguishes from sibling tools like 'listTables' by focusing on detailed metadata for a single table rather than listing tables.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool ('If you don't know the table_guid parameter, retrieve it using listTables'), naming a specific alternative tool. This helps the agent understand the prerequisite relationship between tools.

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-dms-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server