Skip to content

Commit f4dcb80

Browse files
authored
Merge pull request #2 from yanbeipang/yinuo/mcp
Add a new release tag v1.0.0
2 parents 27be09f + 4560ccb commit f4dcb80

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/alibabacloud_dms_mcp_server/server.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ async def getMetaTableDetailInfo(table_guid: str) -> Dict[str, Any]:
377377
378378
""")
379379
async def executeScript(database_id: str, script: str, logic: bool = False) -> Dict[str, Any]:
380-
381380
if not isinstance(script, str) or not script.strip():
382381
error_msg = "Script parameter must be a non-empty string"
383382
logging.error(error_msg)
@@ -400,16 +399,16 @@ async def executeScript(database_id: str, script: str, logic: bool = False) -> D
400399

401400
@mcp.tool(name="nl2sql",
402401
description="""Generate SQL from natural language questions about database data.
403-
402+
404403
This tool converts natural language questions into SQL queries that can be executed against a database.
405404
If you don't have the database_id, use the searchDatabase tool first to identify the correct database.
406405
The sql generated could be executed via DMS executeScript tool provided in this server if necessary.
407-
406+
408407
Parameters:
409408
question (str): Natural language question about the database that needs to be converted to SQL.
410409
database_id (int): DMS databaseId. If not provided, searchDatabase will be used first.
411410
knowledge (Optional[str]): Additional context or database knowledge to improve SQL generation.
412-
411+
413412
Returns:
414413
Dict[str, Any]: A dictionary containing:
415414
- Sql (str): The generated SQL query based on the natural language question

0 commit comments

Comments
 (0)