From 8ad4ded945948c2458f1ae911bddcfca0a99c73c Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Mon, 29 Sep 2025 13:43:43 -0700 Subject: [PATCH 1/5] Fixed MySQL and Postgres tool names --- .../src/Commands/Server/ServerConfigGetCommand.cs | 2 +- .../src/Commands/Server/ServerParamGetCommand.cs | 2 +- .../src/Commands/Table/TableSchemaGetCommand.cs | 2 +- .../src/Commands/Server/ServerConfigGetCommand.cs | 2 +- .../src/Commands/Server/ServerParamGetCommand.cs | 2 +- .../src/Commands/Table/TableSchemaGetCommand.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerConfigGetCommand.cs b/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerConfigGetCommand.cs index c221d1fdd4..d6b8ff9cab 100644 --- a/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerConfigGetCommand.cs +++ b/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerConfigGetCommand.cs @@ -12,7 +12,7 @@ public sealed class ServerConfigGetCommand(ILogger logge { private const string CommandTitle = "Get MySQL Server Configuration"; - public override string Name => "config"; + public override string Name => "get"; public override string Description => "Retrieves comprehensive configuration details for the specified Azure Database for MySQL Flexible Server instance. This command provides insights into server settings, performance parameters, security configurations, and operational characteristics essential for database administration and optimization. Returns configuration data in JSON format including ServerName, Location, Version, SKU, StorageSizeGB, BackupRetentionDays, and GeoRedundantBackup properties."; diff --git a/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerParamGetCommand.cs b/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerParamGetCommand.cs index 5b27a13fc2..b3f54db149 100644 --- a/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerParamGetCommand.cs +++ b/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerParamGetCommand.cs @@ -14,7 +14,7 @@ public sealed class ServerParamGetCommand(ILogger logger) { private const string CommandTitle = "Get MySQL Server Parameter"; - public override string Name => "param"; + public override string Name => "get"; public override string Description => "Retrieves the current value of a single server configuration parameter on an Azure Database for MySQL Flexible Server. Use to inspect a setting (e.g. max_connections, wait_timeout, slow_query_log) before changing it."; diff --git a/tools/Azure.Mcp.Tools.MySql/src/Commands/Table/TableSchemaGetCommand.cs b/tools/Azure.Mcp.Tools.MySql/src/Commands/Table/TableSchemaGetCommand.cs index 38b57d80ec..c0e7260779 100644 --- a/tools/Azure.Mcp.Tools.MySql/src/Commands/Table/TableSchemaGetCommand.cs +++ b/tools/Azure.Mcp.Tools.MySql/src/Commands/Table/TableSchemaGetCommand.cs @@ -15,7 +15,7 @@ public sealed class TableSchemaGetCommand(ILogger logger) { private const string CommandTitle = "Get MySQL Table Schema"; - public override string Name => "schema"; + public override string Name => "get"; public override string Description => "Retrieves detailed schema information for a specific table within an Azure Database for MySQL Flexible Server database. This command provides comprehensive metadata including column definitions, data types, constraints, indexes, and relationships, essential for understanding table structure and supporting application development."; diff --git a/tools/Azure.Mcp.Tools.Postgres/src/Commands/Server/ServerConfigGetCommand.cs b/tools/Azure.Mcp.Tools.Postgres/src/Commands/Server/ServerConfigGetCommand.cs index 1b44888b08..6c010a6b38 100644 --- a/tools/Azure.Mcp.Tools.Postgres/src/Commands/Server/ServerConfigGetCommand.cs +++ b/tools/Azure.Mcp.Tools.Postgres/src/Commands/Server/ServerConfigGetCommand.cs @@ -11,7 +11,7 @@ namespace Azure.Mcp.Tools.Postgres.Commands.Server; public sealed class ServerConfigGetCommand(ILogger logger) : BaseServerCommand(logger) { private const string CommandTitle = "Get PostgreSQL Server Configuration"; - public override string Name => "config"; + public override string Name => "get"; public override string Description => "Retrieve the configuration of a PostgreSQL server."; diff --git a/tools/Azure.Mcp.Tools.Postgres/src/Commands/Server/ServerParamGetCommand.cs b/tools/Azure.Mcp.Tools.Postgres/src/Commands/Server/ServerParamGetCommand.cs index 50643d6f26..ed1cf6ae23 100644 --- a/tools/Azure.Mcp.Tools.Postgres/src/Commands/Server/ServerParamGetCommand.cs +++ b/tools/Azure.Mcp.Tools.Postgres/src/Commands/Server/ServerParamGetCommand.cs @@ -13,7 +13,7 @@ namespace Azure.Mcp.Tools.Postgres.Commands.Server; public sealed class ServerParamGetCommand(ILogger logger) : BaseServerCommand(logger) { private const string CommandTitle = "Get PostgreSQL Server Parameter"; - public override string Name => "param"; + public override string Name => "get"; public override string Description => "Retrieves a specific parameter of a PostgreSQL server."; diff --git a/tools/Azure.Mcp.Tools.Postgres/src/Commands/Table/TableSchemaGetCommand.cs b/tools/Azure.Mcp.Tools.Postgres/src/Commands/Table/TableSchemaGetCommand.cs index 2881fefe6a..e7698e87c6 100644 --- a/tools/Azure.Mcp.Tools.Postgres/src/Commands/Table/TableSchemaGetCommand.cs +++ b/tools/Azure.Mcp.Tools.Postgres/src/Commands/Table/TableSchemaGetCommand.cs @@ -14,7 +14,7 @@ public sealed class TableSchemaGetCommand(ILogger logger) { private const string CommandTitle = "Get PostgreSQL Table Schema"; - public override string Name => "schema"; + public override string Name => "get"; public override string Description => "Retrieves the schema of a specified table in a PostgreSQL database."; public override string Title => CommandTitle; From 327b9cac0b18e0f6bce7ee44da8e54b1bd391e3d Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Mon, 29 Sep 2025 16:00:07 -0700 Subject: [PATCH 2/5] Updated the description of ServerParamSetCommand.cs --- .../src/Commands/Server/ServerParamSetCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerParamSetCommand.cs b/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerParamSetCommand.cs index e5887fe141..f8a8c136dc 100644 --- a/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerParamSetCommand.cs +++ b/tools/Azure.Mcp.Tools.MySql/src/Commands/Server/ServerParamSetCommand.cs @@ -16,7 +16,7 @@ public sealed class ServerParamSetCommand(ILogger logger) public override string Name => "set"; - public override string Description => "Sets/updates a MySQL server configuration parameter to a new value to optimize performance, security, or operational behavior. This command enables fine-tuned configuration management with validation to ensure parameter changes are compatible with the server's current state and constraints."; + public override string Description => "Sets/updates a single MySQL server configuration setting/parameter."; public override string Title => CommandTitle; From ed472499d4becffd5c7312887a74bf5a4e1c4b73 Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Mon, 29 Sep 2025 16:47:51 -0700 Subject: [PATCH 3/5] Fixed unit test --- .../Server/ServerParamSetCommandTests.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerParamSetCommandTests.cs b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerParamSetCommandTests.cs index e37158ef14..1411773764 100644 --- a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerParamSetCommandTests.cs +++ b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerParamSetCommandTests.cs @@ -92,9 +92,6 @@ public void Metadata_IsConfiguredCorrectly() { var command = new ServerParamSetCommand(_logger); - Assert.Equal("set", command.Name); - Assert.Equal("Sets/updates a MySQL server configuration parameter to a new value to optimize performance, security, or operational behavior. This command enables fine-tuned configuration management with validation to ensure parameter changes are compatible with the server's current state and constraints.", command.Description); - Assert.Equal("Set MySQL Server Parameter", command.Title); Assert.True(command.Metadata.Destructive); Assert.False(command.Metadata.ReadOnly); } From 8ab179800df133b54527f622f38b141cdc2dd53b Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Mon, 29 Sep 2025 17:39:55 -0700 Subject: [PATCH 4/5] Updated other unit tests --- .../Database/DatabaseListCommandTests.cs | 3 --- .../Database/DatabaseQueryCommandTests.cs | 3 --- .../Server/ServerConfigGetCommandTests.cs | 3 --- .../Server/ServerListCommandTests.cs | 3 --- .../Server/ServerParamGetCommandTests.cs | 3 --- .../Table/TableListCommandTests.cs | 3 --- .../Table/TableSchemaGetCommandTests.cs | 3 --- 7 files changed, 21 deletions(-) diff --git a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Database/DatabaseListCommandTests.cs b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Database/DatabaseListCommandTests.cs index 23de2b0342..8b9fd01795 100644 --- a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Database/DatabaseListCommandTests.cs +++ b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Database/DatabaseListCommandTests.cs @@ -113,9 +113,6 @@ public void Metadata_IsConfiguredCorrectly() { var command = new DatabaseListCommand(_logger); - Assert.Equal("list", command.Name); - Assert.Equal("Retrieves a comprehensive list of all databases available on the specified Azure Database for MySQL Flexible Server instance. This command provides visibility into the database structure and helps identify available databases for connection and querying operations.", command.Description); - Assert.Equal("List MySQL Databases", command.Title); Assert.False(command.Metadata.Destructive); Assert.True(command.Metadata.ReadOnly); } diff --git a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Database/DatabaseQueryCommandTests.cs b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Database/DatabaseQueryCommandTests.cs index b7d1321531..b843704851 100644 --- a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Database/DatabaseQueryCommandTests.cs +++ b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Database/DatabaseQueryCommandTests.cs @@ -89,9 +89,6 @@ public void Metadata_IsConfiguredCorrectly() { var command = new DatabaseQueryCommand(_logger); - Assert.Equal("query", command.Name); - Assert.Equal("Executes a safe, read-only SQL SELECT query against a database on Azure Database for MySQL Flexible Server. Use this tool to explore or retrieve table data without modifying it. Rejects non-SELECT statements (INSERT/UPDATE/DELETE/REPLACE/MERGE/TRUNCATE/ALTER/CREATE/DROP), multi-statements, comments hiding writes, transaction control (BEGIN/COMMIT/ROLLBACK), INTO OUTFILE, and other destructive keywords. Only a single SELECT is executed to ensure data integrity. Best practices: List needed columns (avoid SELECT *), add WHERE filters, use LIMIT/OFFSET for paging, ORDER BY for deterministic results, and avoid unnecessary sensitive data. Example: SELECT id, name, status FROM customers WHERE status = 'Active' ORDER BY name LIMIT 50;", command.Description); - Assert.Equal("Query MySQL Database", command.Title); Assert.False(command.Metadata.Destructive); Assert.True(command.Metadata.ReadOnly); } diff --git a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerConfigGetCommandTests.cs b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerConfigGetCommandTests.cs index f674087720..3d0e4b1c1a 100644 --- a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerConfigGetCommandTests.cs +++ b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerConfigGetCommandTests.cs @@ -97,9 +97,6 @@ public void Metadata_IsConfiguredCorrectly() { var command = new ServerConfigGetCommand(_logger); - Assert.Equal("config", command.Name); - Assert.Equal("Retrieves comprehensive configuration details for the specified Azure Database for MySQL Flexible Server instance. This command provides insights into server settings, performance parameters, security configurations, and operational characteristics essential for database administration and optimization. Returns configuration data in JSON format including ServerName, Location, Version, SKU, StorageSizeGB, BackupRetentionDays, and GeoRedundantBackup properties.", command.Description); - Assert.Equal("Get MySQL Server Configuration", command.Title); Assert.False(command.Metadata.Destructive); Assert.True(command.Metadata.ReadOnly); } diff --git a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerListCommandTests.cs b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerListCommandTests.cs index 01baa3b6b1..643c2a7b74 100644 --- a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerListCommandTests.cs +++ b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerListCommandTests.cs @@ -85,9 +85,6 @@ public void Metadata_IsConfiguredCorrectly() { var command = new ServerListCommand(_logger); - Assert.Equal("list", command.Name); - Assert.Equal("Discovers and lists all Azure Database for MySQL Flexible Server instances within the specified resource group. This command provides an inventory of available MySQL server resources, including their names and current status, enabling efficient server management and resource planning.", command.Description); - Assert.Equal("List MySQL Servers", command.Title); Assert.False(command.Metadata.Destructive); Assert.True(command.Metadata.ReadOnly); } diff --git a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerParamGetCommandTests.cs b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerParamGetCommandTests.cs index bc521a0b3e..fef9044d95 100644 --- a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerParamGetCommandTests.cs +++ b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Server/ServerParamGetCommandTests.cs @@ -90,9 +90,6 @@ public void Metadata_IsConfiguredCorrectly() { var command = new ServerParamGetCommand(_logger); - Assert.Equal("param", command.Name); - Assert.Equal("Retrieves the current value of a single server configuration parameter on an Azure Database for MySQL Flexible Server. Use to inspect a setting (e.g. max_connections, wait_timeout, slow_query_log) before changing it.", command.Description); - Assert.Equal("Get MySQL Server Parameter", command.Title); Assert.False(command.Metadata.Destructive); Assert.True(command.Metadata.ReadOnly); } diff --git a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Table/TableListCommandTests.cs b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Table/TableListCommandTests.cs index 923753309b..e85e6459ee 100644 --- a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Table/TableListCommandTests.cs +++ b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Table/TableListCommandTests.cs @@ -89,9 +89,6 @@ public void Metadata_IsConfiguredCorrectly() { var command = new TableListCommand(_logger); - Assert.Equal("list", command.Name); - Assert.Equal("Enumerates all tables within a specified database on an Azure Database for MySQL Flexible Server instance. This command provides a complete inventory of table objects, facilitating database exploration, schema analysis, and data architecture understanding for development tasks.", command.Description); - Assert.Equal("List MySQL Tables", command.Title); Assert.False(command.Metadata.Destructive); Assert.True(command.Metadata.ReadOnly); } diff --git a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Table/TableSchemaGetCommandTests.cs b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Table/TableSchemaGetCommandTests.cs index ebcc17c788..91e0834f9a 100644 --- a/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Table/TableSchemaGetCommandTests.cs +++ b/tools/Azure.Mcp.Tools.MySql/tests/Azure.Mcp.Tools.MySql.UnitTests/Table/TableSchemaGetCommandTests.cs @@ -89,9 +89,6 @@ public void Metadata_IsConfiguredCorrectly() { var command = new TableSchemaGetCommand(_logger); - Assert.Equal("schema", command.Name); - Assert.Equal("Retrieves detailed schema information for a specific table within an Azure Database for MySQL Flexible Server database. This command provides comprehensive metadata including column definitions, data types, constraints, indexes, and relationships, essential for understanding table structure and supporting application development.", command.Description); - Assert.Equal("Get MySQL Table Schema", command.Title); Assert.False(command.Metadata.Destructive); Assert.True(command.Metadata.ReadOnly); } From c58f8438b29efad9a35af1ee9921ee3235f2fa6f Mon Sep 17 00:00:00 2001 From: vcolin7 Date: Mon, 29 Sep 2025 17:42:40 -0700 Subject: [PATCH 5/5] Updated CHANGELOG --- servers/Azure.Mcp.Server/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/servers/Azure.Mcp.Server/CHANGELOG.md b/servers/Azure.Mcp.Server/CHANGELOG.md index 2ce1bdf008..46b673ff3c 100644 --- a/servers/Azure.Mcp.Server/CHANGELOG.md +++ b/servers/Azure.Mcp.Server/CHANGELOG.md @@ -9,6 +9,7 @@ The Azure MCP Server updates automatically by default whenever a new release com - Added support for Azure Developer CLI (azd) MCP tools when azd CLI is installed locally - [[#566](https://github.com/microsoft/mcp/issues/566)] - Adds support to proxy MCP capabilities when child servers leverage sampling or elicitation. [[#581](https://github.com/microsoft/mcp/pull/581)] - Added support for publishing custom events to Event Grid topics via the command `azmcp_eventgrid_events_publish`. Supports EventGrid, CloudEvents, and custom schemas with structured event data delivery for event-driven architectures. [[#514](https://github.com/microsoft/mcp/pull/514)] +- Updated the description of the `azmcp_mysql_server_param_set` tool to increase selection accuracy by LLMs [[#614](https://github.com/microsoft/mcp/pull/614)] ### Breaking Changes