Skip to content

Commit 893848a

Browse files
committed
updated old method as well
1 parent 022babc commit 893848a

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

tools/Mcp/test/vscode/mcpprompt.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,33 @@
1212

1313
# Instructions
1414

15-
## Stage 1: Capturing Placeholder Values
16-
- Ask the user for the following placeholder values: serviceName, commitId, serviceSpecs, swaggerFileSpecs.
17-
- Examples:
18-
- serviceName: HybridConnectivity
19-
- commitId: <commit hash of the swagger>
20-
- serviceSpecs: hybridconnectivity/resource-manager
21-
- swaggerFileSpecs: hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/stable/2024-12-01/hybridconnectivity.json
22-
- Do not replace or modify this prompt file.
23-
- Store the values for use in later steps like generating the README and executing Autorest.
24-
- Once values are stored, mark Stage 1 as complete.
15+
## Stage 1: Interactive spec selection and autorest resolution
16+
- Ask the user for their desired **PowerShell module name** (e.g., "HybridConnectivity")
17+
- Call the MCP tool "list-spec-modules" to fetch all available specification folders from azure-rest-api-specs/specification.
18+
- From the full list, present 10 most relevant spec options to the user based on their PowerShell module name, or show a representative sample if no clear match.
19+
- Ask the user to choose which specification they want to use from the presented options, or ask if they want to see more options.
20+
- **Confirm the spec choice**: Once user selects a spec, ask them to confirm this is the correct specification for their needs (show the spec name clearly).
21+
- Call the MCP tool "list-providers" with the chosen spec folder to retrieve available provider namespaces.
22+
- Present the list of providers to the user:
23+
- If multiple providers are returned, ask the user to pick one
24+
- If only one provider exists, select it automatically but confirm with the user
25+
- **Confirm the provider choice**: Ask the user to confirm this is the correct provider namespace.
26+
- Call the MCP tool "list-api-versions" with the chosen spec folder and provider to get available versions, separated by Stable and Preview.
27+
- Present the API version options to the user and ask them to choose:
28+
1. **Stability**: stable or preview
29+
2. **API version**: specific version from the available list
30+
- **Confirm the API version choice**: Ask the user to confirm their stability and version selection.
31+
- Call the MCP tool "resolve-autorest-inputs" with the chosen spec folder, provider, stability, and version to compute the 4 autorest inputs: serviceName, commitId, serviceSpecs, swaggerFileSpecs.
32+
- Store the resolved values for later steps (README generation and Autorest). Mark Stage 1 complete.
2533

2634
## Stage 2: Generating partner powershell module
2735
- FOLLOW ALL THE STEPS. DO NOT SKIP ANY STEPS.
2836
- Navigate to the `src` folder in the home "azure-powershell" directory.
29-
- Create a new folder named <serviceName> and within it a new folder named `<serviceName>.Autorest`. (If not already present)
30-
- Move into the new folder `<serviceName>/<serviceName>.Autorest`, using the command `cd <serviceName>/<serviceName>.Autorest`.
37+
- Create a new folder named <PowerShell module name> and within it a new folder named `<PowerShell module name>.Autorest`. (If not already present)
38+
- Move into the new folder `<PowerShell module name>/<PowerShell module name>.Autorest`, using the command `cd <PowerShell module name>/<PowerShell module name>.Autorest`.
3139
- Create a new file `README.md`. (If not already present)
3240
- Add the content labelled below as `Readme Content` in this file.
33-
- Use the "generate-autorest" mcp tool to generate the <serviceName> module.
41+
- Use the "generate-autorest" mcp tool to generate the <PowerShell module name> module.
3442
- Stage 2 Complete.
3543

3644
## Stage 3: Updating Example Files
@@ -78,8 +86,8 @@ input-file:
7886

7987
module-version: 0.1.0
8088

81-
title: <serviceName>
82-
service-name: <serviceName>
89+
title: <PowerShell module name>
90+
service-name: <PowerShell module name>
8391
subject-prefix: $(service-name)
8492

8593
directive:

0 commit comments

Comments
 (0)