Skip to content

Commit 022babc

Browse files
committed
Updated the fuzzy search flow
1 parent 06421e4 commit 022babc

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

tools/Mcp/src/specs/prompts/partner-module-workflow.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,33 @@
1212

1313
# Instructions
1414

15-
## Stage 1: Fuzzy selection and autorest inputs (reduced user input)
16-
- Ask the user for only the approximate Azure service/module name (e.g., "hybrid connectivity").
17-
- Call the MCP tool "list-spec-modules" to fetch all service folders from azure-rest-api-specs/specification.
18-
- Fuzzily match the user's input to the closest service name. Show top 3 matches and ask the user to confirm the service folder to use.
19-
- Call the MCP tool "list-providers" with the chosen service to retrieve provider namespaces. If multiple providers are returned, ask the user to pick one; if only one, select it automatically.
20-
- Ask the user what they want to call the PowerShell module title/service-name (e.g., HybridConnectivity). This is the display/module name, not the spec folder name.
21-
- Call the MCP tool "list-api-versions" with service and provider to get available versions, separated by Stable and Preview. Ask the user to choose stability (stable/preview) and a specific API version.
22-
- Call the MCP tool "resolve-autorest-inputs" with service, provider, stability, and version to compute the 4 inputs: serviceName, commitId, serviceSpecs, swaggerFileSpecs.
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.
2332
- Store the resolved values for later steps (README generation and Autorest). Mark Stage 1 complete.
2433

2534
## Stage 2: Generating partner powershell module
2635
- FOLLOW ALL THE STEPS. DO NOT SKIP ANY STEPS.
2736
- Navigate to the `src` folder in the home "azure-powershell" directory.
28-
- Create a new folder named <serviceName> and within it a new folder named `<serviceName>.Autorest`. (If not already present)
29-
- 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`.
3039
- Create a new file `README.md`. (If not already present)
3140
- Add the content labelled below as `Readme Content` in this file.
32-
- 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.
3342
- Stage 2 Complete.
3443

3544
## Stage 3: Updating Example Files
@@ -77,8 +86,8 @@ input-file:
7786

7887
module-version: 0.1.0
7988

80-
title: <serviceName>
81-
service-name: <serviceName>
89+
title: <PowerShell module name>
90+
service-name: <PowerShell module name>
8291
subject-prefix: $(service-name)
8392

8493
directive:

0 commit comments

Comments
 (0)