You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[azure-sdk-java-mcp] Fix typos and address comments on the initial pr (#46011)
* update according to comments
* fix the issue that pure `mvn` commands are run after running build java sdk
* Update eng/tools/mcp/azure-sdk-java-mcp/src/index.ts
Co-authored-by: Copilot <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,10 +22,14 @@ The Azure SDK for Java repository contains client libraries for Azure services,
22
22
-**Management Libraries**: Libraries with Maven group `com.azure.resourcemanager`
23
23
-**Spring Libraries**: Libraries with Maven group `com.azure.spring`
24
24
25
-
## SDK Generation Guildlines
25
+
## SDK Generation Guidelines
26
26
27
27
ACTION: Use azure-sdk-java-mcp sdk tools to generate the SDK.
28
-
ACTION: Use azure-sdk-java-mcp sdk tools to build the SDK.
28
+
ACTION: Do not use pure `mvn` command to compile, build or package SDK, use `build_java_sdk` tool instead, it runs `mvn` command inside.
29
+
ACTION: Use azure-sdk-java-mcp sdk tool `update_client_name` to update client name.
30
+
ACTION: Do not clean Java source before generating the SDK because the generated code may have manual written customized code.
31
+
ACTION: Only update the manual written code or class when you fix compile errors. Manual written class does not have `// Code generated by Microsoft (R) TypeSpec Code Generator.` header. Manual written functions or properties do not have `@Generated` annotation.
Copy file name to clipboardExpand all lines: eng/tools/mcp/azure-sdk-java-mcp/README.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ A Model Context Protocol (MCP) server that provides comprehensive tools for gene
6
6
7
7
This MCP server provides the following tools:
8
8
9
-
1.**sync_java_sdk** - Synchronize/Download TypeSpec source files for Java SDK generation from local or remote sources
9
+
1.**sync_typespec_source_files** - Synchronize/Download TypeSpec source files for Java SDK generation from local or remote sources
10
10
2.**generate_java_sdk** - Generate or update Java SDK code from TypeSpec definitions
11
11
3.**clean_java_source** - Clean and remove generated Java source files from SDK directory
12
12
4.**build_java_sdk** - Compile and build the Java SDK with Maven for Azure services
@@ -23,7 +23,8 @@ Before using this MCP server, ensure you have:
23
23
1.**Project Structure** - The tools can be run from either:
24
24
- A service module directory containing `tsp-location.yaml` (e.g., `/azure-sdk-for-java/sdk/batch/azure-compute-batch`)
25
25
- The SDK root directory (e.g., `/azure-sdk-for-java`)
26
-
2.**Nodejs** installed.
26
+
2.**Node.js** - Version 20.0.0 or higher installed.
27
+
3.**MCP Client** - A compatible MCP client such as GitHub Copilot or Claude Desktop
27
28
28
29
## Configure MCP Server in VSCode
29
30
@@ -84,7 +85,7 @@ npm run test:run # Run tests once
84
85
85
86
## Tools Documentation
86
87
87
-
### 1. sync_java_sdk
88
+
### 1. sync_typespec_source_files
88
89
Synchronize/Download the TypeSpec source for a target service to generate Java SDK from. Always ask user to provide local tspconfig.yaml path or remote tspconfig.yaml url. The tool takes local tspconfig.yaml path or remote tspconfig.yaml url as input parameter.
89
90
90
91
**Parameters:**
@@ -96,7 +97,7 @@ Synchronize/Download the TypeSpec source for a target service to generate Java S
Copy file name to clipboardExpand all lines: eng/tools/mcp/azure-sdk-java-mcp/src/index.ts
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -146,9 +146,9 @@ server.registerTool(
146
146
},
147
147
);
148
148
149
-
// Tool: sync_java_sdk
149
+
// Tool: sync_typespec_source_files
150
150
server.registerTool(
151
-
"sync_java_sdk",
151
+
"sync_typespec_source_files",
152
152
{
153
153
description:
154
154
"Synchronize or download the TypeSpec source for a target service to enable Java SDK generation. Accepts either a local absolute path to tspconfig.yaml or a remote URL (with commit id, not branch name).",
"Generate the Java SDK from TypeSpec source files located in the 'TempTypeSpecFiles' directory within the specified working directory. If 'TempTypeSpecFiles' is not present, prompt the user to specify whether to generate from a local or remote TypeSpec source, and use the sync_java_sdk tool as needed before proceeding.",
185
+
"Generate the Java SDK from TypeSpec source files located in the 'TempTypeSpecFiles' directory within the specified working directory. If 'TempTypeSpecFiles' is not present, prompt the user to specify whether to generate from a local or remote TypeSpec source, and use the sync_typespec_source_files tool as needed before proceeding.",
0 commit comments