Alibaba Cloud DMS MCP Server

Official
by aliyun

nl2sql

Convert natural language questions into executable SQL queries for querying database data. Ideal for simplifying database interactions by leveraging natural language input.

Instructions

Generate SQL from natural language questions about database data.

This tool converts natural language questions into SQL queries that can be executed against a database. If you don't have the database_id, use the searchDatabase tool first to identify the correct database. The sql generated could be executed via DMS executeScript tool provided in this server if necessary. Parameters: question (str): Natural language question about the database that needs to be converted to SQL. database_id (int): DMS databaseId. If not provided, searchDatabase will be used first. knowledge (Optional[str]): Additional context or database knowledge to improve SQL generation. Returns: Dict[str, Any]: A dictionary containing: - Sql (str): The generated SQL query based on the natural language question

Input Schema

NameRequiredDescriptionDefault
database_idYes
knowledgeNo
questionYes

Input Schema (JSON Schema)

{ "properties": { "database_id": { "title": "Database Id", "type": "string" }, "knowledge": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Knowledge" }, "question": { "title": "Question", "type": "string" } }, "required": [ "database_id", "question" ], "title": "nl2sqlArguments", "type": "object" }

You must be authenticated.

Other Tools from Alibaba Cloud DMS MCP Server

Related Tools

ID: hyhi1ys72b