Skip to content

Conversation

ericshape
Copy link
Member

@ericshape ericshape commented Sep 18, 2025

What does this PR do?

Add azmcp sql server list command and unit tests

GitHub issue number?

#126

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Updated command list in /docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

@ericshape ericshape self-assigned this Sep 18, 2025
@ericshape ericshape added this to the 2025-09 milestone Sep 18, 2025
@ericshape ericshape marked this pull request as ready for review September 18, 2025 21:21
@Copilot Copilot AI review requested due to automatic review settings September 18, 2025 21:21
@ericshape ericshape requested review from achyuth-ms and a team as code owners September 18, 2025 21:21
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new command azmcp sql server list that lists Azure SQL servers within a resource group, including comprehensive unit tests and documentation updates.

Key changes:

  • Implements a new list command for SQL servers with proper input validation and error handling
  • Adds comprehensive unit test coverage including success scenarios, error cases, and edge conditions
  • Updates documentation and command registration to include the new functionality

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ServerListCommandTests.cs Comprehensive unit tests covering validation, success scenarios, error handling, and edge cases
SqlSetup.cs Registers the new ServerListCommand in the command structure
SqlService.cs Implements ListServersAsync method with proper error handling and resource group validation
ISqlService.cs Adds interface definition for the ListServersAsync method
ServerListOptions.cs Defines options class extending SubscriptionOptions for the list command
SqlJsonContext.cs Adds JSON serialization support for ServerListResult
ServerListCommand.cs Main command implementation with validation, execution logic, and error handling
e2eTestPrompts.md Adds test prompts for the new list command functionality
azmcp-commands.md Documents the new command usage and syntax

@ericshape
Copy link
Member Author

/azp run mcp - pullrequest - live

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@joshfree joshfree moved this from Untriaged to In Progress in Azure MCP Server Sep 19, 2025
@ericshape ericshape enabled auto-merge (squash) September 19, 2025 22:59
@ericshape ericshape merged commit 35e5d31 into microsoft:main Sep 19, 2025
26 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Azure MCP Server Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants