-
Notifications
You must be signed in to change notification settings - Fork 240
Az SDK Tools MCP: Guidelines for CLI command grouping #12071
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
Merged
praveenkuttappan
merged 9 commits into
Azure:main
from
praveenkuttappan:azsdk_mcp_cli_grouping
Oct 13, 2025
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
32de03a
Az SDK Tools MCP: Guidelines for CLI command grouping
praveenkuttappan 3e83465
update tsp-client example
praveenkuttappan 318ce13
Apply suggestions from code review
praveenkuttappan 52d8f2c
Apply suggestions from code review
praveenkuttappan 0e8427b
Updated as per suggestions
praveenkuttappan 5dbcfbe
Update as per review comments
praveenkuttappan 78e95b8
Apply suggestions from code review
praveenkuttappan ad14922
Update tools/azsdk-cli/docs/cli-commands-guidelines.md
praveenkuttappan 1286d90
Updates as per review comments
praveenkuttappan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| # Azure SDK Tools CLI Command Guidelines | ||
|
|
||
| This document provides comprehensive guidelines for creating CLI commands in the `Azure.Sdk.Tools.Cli` project. All CLI commands must follow these established patterns and conventions to ensure consistency, maintainability, and proper integration with both CLI and MCP (Model Context Protocol) server functionality. | ||
| Azure SDK developers and service team can use these CLI commands to generate, build, test and release Azure SDK. | ||
|
|
||
| ## Namespace Organization | ||
|
|
||
| ### Directory Structure | ||
|
|
||
| ``` | ||
| Tools/ | ||
| ├── Package/ # Package-level operations | ||
| ├── ReleasePlan/ # Release planning operations | ||
| ├── TypeSpec/ # TypeSpec operations | ||
| ``` | ||
|
|
||
| ## Command Hierarchy | ||
|
|
||
| All CLI commands must follow a predefined top-level command hierarchy. Commands are organized into the following categories: | ||
|
|
||
| ### 1. **package** - Package Operations | ||
|
|
||
| **Namespace:** `Azure.Sdk.Tools.Cli.Tools.Package` | ||
| **Command Group:** `SharedCommandGroups.Package` | ||
| **Verb:** `package` or `pkg` | ||
|
|
||
| For operations at the SDK package level. The package group has further sub-grouping for better organization: | ||
|
|
||
| #### Core Package Operations: | ||
|
|
||
| - Build/compile SDK code | ||
| - Generate SDKs | ||
| - Release packages | ||
| - Update version information | ||
| - Validate packages | ||
|
|
||
| #### Sub-Groups: | ||
|
|
||
| ##### **readme** - README Operations | ||
|
|
||
| For generating and updating README files: | ||
|
|
||
| - Generate README | ||
| - Update README | ||
|
|
||
| ##### **sample** - Sample Operations | ||
|
|
||
| For generating and updating SDK samples: | ||
|
|
||
| - Create samples | ||
| - Update samples | ||
|
|
||
| ##### **test** - Test Operations | ||
|
|
||
| For creating, updating, and running tests for SDK packages: | ||
|
|
||
| - Create tests | ||
| - Update tests | ||
| - Run tests for specific packages | ||
|
|
||
| **Examples:** | ||
|
|
||
| - `package build --package-path ./sdk/storage` | ||
|
praveenkuttappan marked this conversation as resolved.
|
||
| - `package generate --typespec-project ./specification/storage` | ||
| - `package readme generate --package-path ./sdk/compute` | ||
| - `package readme update --package-path ./sdk/keyvault --section getting-started` | ||
| - `package release --package-name azure-core` | ||
| - `package sample generate --package-path ./sdk/compute` | ||
| - `package sample update --package-path ./sdk/storage --sample-name basic-usage` | ||
| - `package test generate --package-path ./sdk/storage --test-type <type>` | ||
| - `package test run --package-path ./sdk/keyvault --test-suite integration` | ||
| - `package validate --package-path ./sdk/keyvault` | ||
|
praveenkuttappan marked this conversation as resolved.
praveenkuttappan marked this conversation as resolved.
|
||
|
|
||
| ### 2. **release-plan** - Release Plan | ||
|
|
||
| **Namespace:** `Azure.Sdk.Tools.Cli.Tools.ReleasePlan` | ||
| **Command Group:** Custom (no predefined group) | ||
| **Verb:** `release-plan` | ||
|
|
||
| For release planning and SDK coordination: | ||
|
|
||
| - Create release plans | ||
| - Link SDK pull requests to release plan | ||
| - Get release plan details | ||
|
|
||
| **Examples:** | ||
|
|
||
| - `release-plan get --workitem-id 456` | ||
|
praveenkuttappan marked this conversation as resolved.
|
||
| - `release-plan link-sdk-pr --release-plan-id 123 --pr 789` | ||
|
|
||
| ### 3. **typespec** - TypeSpec Operations and TypeSpec Client Operations | ||
|
|
||
| **Namespace:** `Azure.Sdk.Tools.Cli.Tools.TypeSpec` | ||
| **Command Group:** `SharedCommandGroups.TypeSpec` | ||
| **Verb:** `tsp` | ||
|
praveenkuttappan marked this conversation as resolved.
|
||
|
|
||
| For TypeSpec-related operations: | ||
|
|
||
| - Create TypeSpec projects | ||
| - Convert Swagger to TypeSpec | ||
| - Validate TypeSpec projects | ||
| - Common TypeSpec workflows | ||
|
|
||
| **Examples:** | ||
|
|
||
| - `tsp convert --swagger-file ./swagger.json` | ||
| - `tsp init --name MyService` | ||
| - `tsp client update --config-path ./tspconfig.yaml` | ||
|
praveenkuttappan marked this conversation as resolved.
Outdated
praveenkuttappan marked this conversation as resolved.
Outdated
|
||
| - `tsp validate --project-path ./typespec` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.