Skip to main content
Glama
aliyun

Hologres MCP Server

Official
by aliyun

show_hg_table_ddl

Retrieve the Data Definition Language (DDL) script for tables, views, or foreign tables in Hologres databases to understand their structure and recreate them.

Instructions

Show DDL script for a table, view, or foreign table in Hologres database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYesSchema name in Hologres database
tableYesTable name in Hologres database

Implementation Reference

  • Handler implementation for the 'show_hg_table_ddl' tool within the call_tool function. It validates input arguments, constructs the SQL query using hg_dump_script to fetch the table DDL, and passes it to the general execution handler.
    elif name == "show_hg_table_ddl": schema = arguments.get("schema") table = arguments.get("table") if not all([schema, table]): raise ValueError("Schema and table are required") query = f"SELECT hg_dump_script('\"{schema}\".\"{table}\"')"
  • Registration of the 'show_hg_table_ddl' tool in the list_tools() function, including name, description, and input schema definition.
    # 新增 show_hg_table_ddl 工具 Tool( name="show_hg_table_ddl", description="Show DDL script for a table, view, or foreign table in Hologres database.", inputSchema={ "type": "object", "properties": { "schema": { "type": "string", "description": "Schema name in Hologres database" }, "table": { "type": "string", "description": "Table name in Hologres database" } }, "required": ["schema", "table"] } )
  • Input schema definition for the 'show_hg_table_ddl' tool, specifying required 'schema' and 'table' string parameters.
    inputSchema={ "type": "object", "properties": { "schema": { "type": "string", "description": "Schema name in Hologres database" }, "table": { "type": "string", "description": "Table name in Hologres database" } }, "required": ["schema", "table"] }

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

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