-
Notifications
You must be signed in to change notification settings - Fork 190
Add extension cli generate command #461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add extension cli generate command #461
Conversation
376474e
to
191a74e
Compare
var accessToken = await cliGenerateService.GetAzCliGenerateTokenAsync(); | ||
|
||
// GHCP4A Prod app | ||
const string url = "https://aiservice.ghcpaz-prod.azure.com/api/azurecli/generate"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API hasn't been deployed to Prod yet. The implementation has been merged and will be deployed soon.
8873f2b
to
5ddc234
Compare
There was a problem hiding this 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 cligenerate
command to the Azure MCP Server that generates Azure CLI commands using an LLM-powered service. The command takes user intent as input and produces validated Azure CLI commands through an external API service.
Key changes:
- Implements a new CLI generation service that communicates with an external Azure API endpoint
- Adds comprehensive command structure with options validation and error handling
- Provides unit tests to ensure the command functionality works correctly
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
CliGenerateCommand.cs | Main command implementation with validation and Azure CLI generation logic |
ICliGenerateService.cs | Service interface for CLI generation operations |
CliGenerateService.cs | Service implementation that handles HTTP requests to external API |
ExtensionOptionDefinitions.cs | Command option definitions for intent and CLI type parameters |
CliGenerateOptions.cs | Options model for binding command line arguments |
CliGenerateResult.cs | Result model for returning generated CLI commands |
CliGenerateRequest.cs | Request models for API communication |
ExtensionSetup.cs | Service registration and command setup |
Constants.cs | Azure CLI type constant definition |
ExtensionJsonContext.cs | JSON serialization context updates |
Azure.Mcp.Tools.Extension.csproj | Project file cleanup |
README.md | Documentation updates |
CHANGELOG.md | Feature addition notes |
e2eTestPrompts.md | Test prompts for the new functionality |
azmcp-commands.md | Command documentation |
CliGenerateCommandTests.cs | Unit tests for the CLI generate command |
tools/Azure.Mcp.Tools.Extension/src/Options/CliGenerateOptions.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Extension/src/Models/CliGenerateRequest.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Extension/src/Models/CliGenerateRequest.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Extension/src/Commands/CliGenerateCommand.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Extension/src/Commands/CliGenerateCommand.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Extension/src/Commands/CliGenerateCommand.cs
Outdated
Show resolved
Hide resolved
tools/Azure.Mcp.Tools.Extension/src/Commands/CliGenerateCommand.cs
Outdated
Show resolved
Hide resolved
1761780
to
4842872
Compare
ca2f40d
to
666d803
Compare
What does this PR do?
Add a new cligenerate command that can generate Azure Cli commands using a LLM powered services. This service can produce higher quality commands than what the LLM can generate on its own and guarantees the returned commands are valid through validation.
GitHub issue number?
#203
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.md
and/orservers/Fabric.Mcp.Server/CHANGELOG.md
for product changes (features, bug fixes, UI/UX, updated dependencies
)servers/Azure.Mcp.Server/README.md
and/orservers/Fabric.Mcp.Server/README.md
documentation/docs/azmcp-commands.md
and/or/docs/fabric-commands.md
ToolDescriptionEvaluator
and obtained a score of0.4
or more and a top 3 ranking for all related test prompts/docs/e2eTestPrompts.md
crypto mining, spam, data exfiltration, etc.
)/azp run mcp - pullrequest - live
to run Live Test Pipeline