diff --git a/servers/Azure.Mcp.Server/CHANGELOG.md b/servers/Azure.Mcp.Server/CHANGELOG.md index cf965afbd8..63e2445b87 100644 --- a/servers/Azure.Mcp.Server/CHANGELOG.md +++ b/servers/Azure.Mcp.Server/CHANGELOG.md @@ -24,9 +24,10 @@ The Azure MCP Server updates automatically by default whenever a new release com ### Bugs Fixed +- Fixed test failures in CI for SQL commands for `BaseSqlCommand` (--server option) and `BaseDatabaseCommand` (--database option) by using `.AsRequired()` extension method for consistent validation. [[#943](https://github.com/microsoft/mcp/issues/943), [#1013](https://github.com/microsoft/mcp/issues/1013)] - Avoid spawning child processes per namespace for consolidated mode [[#1002](https://github.com/microsoft/mcp/pull/1002)] - Improvement to learning experience by ignoring `command` parameter, which resulted in neither learning nor a tool call to happen. Learning is now always invoked when `learn=true` is passed. [[#1057](https://github.com/microsoft/mcp/pull/1057)] -- Adds descriptions to the tools metadata, to ensure enough information is present in the cli to generate docs for metadata. [[#1043](https://github.com/microsoft/mcp/pull/1043)] +- Adds descriptions to the tools metadata, to ensure enough information is present in the cli to generate docs for metadata. [[#1043](https://github.com/microsoft/mcp/pull/1043)] ### Other Changes diff --git a/tools/Azure.Mcp.Tools.Sql/src/Commands/BaseDatabaseCommand.cs b/tools/Azure.Mcp.Tools.Sql/src/Commands/BaseDatabaseCommand.cs index df09c522ea..ef2d245dc0 100644 --- a/tools/Azure.Mcp.Tools.Sql/src/Commands/BaseDatabaseCommand.cs +++ b/tools/Azure.Mcp.Tools.Sql/src/Commands/BaseDatabaseCommand.cs @@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis; using Azure.Mcp.Core.Commands; using Azure.Mcp.Core.Extensions; +using Azure.Mcp.Core.Models.Option; using Azure.Mcp.Tools.Sql.Options; using Microsoft.Extensions.Logging; @@ -16,7 +17,7 @@ public abstract class BaseDatabaseCommand< protected override void RegisterOptions(Command command) { base.RegisterOptions(command); - command.Options.Add(SqlOptionDefinitions.Database); + command.Options.Add(SqlOptionDefinitions.Database.AsRequired()); } protected override TOptions BindOptions(ParseResult parseResult)