Skip to content

Commit 3e5e6f5

Browse files
committed
refactor(main): Rename and restructure modules for clarity
1 parent a1c0276 commit 3e5e6f5

File tree

41 files changed

+439
-208
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+439
-208
lines changed

agent/agent.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,20 @@
33
from mcp_agent.core.fastagent import FastAgent
44

55
# Create the application
6-
fast = FastAgent("FastAgent for MCP Server Chat2MySQL")
6+
fast = FastAgent("FastAgent for MCP Server Examples")
77

88

99
# Define the agent
1010
@fast.agent(
11-
name="mcp-server-chat2mysql",
12-
instruction="""You are a helpful AI Agent that is able to interact with users
13-
and to call the resources, prompts, tools of the MCP server named chat2mysql.
11+
name="mcp-server-examples",
12+
instruction="""
13+
You are a helpful AI Agent that is able to interact with users
14+
and to call the resources, prompts, tools of the MCP server.
1415
""",
15-
servers=["chat2mysql"]
16+
servers=[
17+
"chat2mysql",
18+
"filesystem"
19+
]
1620
)
1721
async def main():
1822
# use the --model command line switch or agent arguments to change model

mcp-server-chat2mysql/commons/pom.xml renamed to mcp-server-chat2mysql/chat2mysql-commons/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<version>1.0.0-SNAPSHOT</version>
1111
</parent>
1212

13-
<artifactId>commons</artifactId>
13+
<artifactId>chat2mysql-commons</artifactId>
1414
<packaging>jar</packaging>
1515

1616
<properties>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>com.github.codeboyzhou</groupId>
9+
<artifactId>mcp-server-chat2mysql</artifactId>
10+
<version>1.0.0-SNAPSHOT</version>
11+
</parent>
12+
13+
<artifactId>chat2mysql-declarative-sdk-example</artifactId>
14+
<packaging>jar</packaging>
15+
16+
<properties>
17+
<java.version>17</java.version>
18+
<maven.compiler.source>${java.version}</maven.compiler.source>
19+
<maven.compiler.target>${java.version}</maven.compiler.target>
20+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
21+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
22+
</properties>
23+
24+
<dependencies>
25+
<dependency>
26+
<groupId>com.github.codeboyzhou</groupId>
27+
<artifactId>chat2mysql-commons</artifactId>
28+
</dependency>
29+
</dependencies>
30+
31+
</project>

mcp-server-chat2mysql/declarative-sdk-example/src/main/java/com/github/mcp/server/chat2mysql/MyMcpPrompts.java renamed to mcp-server-chat2mysql/chat2mysql-declarative-sdk-example/src/main/java/com/github/mcp/server/chat2mysql/MyMcpPrompts.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class MyMcpPrompts {
2424
*/
2525
@McpPrompt(name = "generate_sql_optimization_tips", description = "Generate SQL optimization tips.")
2626
public static String generateSqlOptimizationTips(
27-
@McpPromptParam(name = "sql", description = "The SQL query to optimize.", required = true) String sql
27+
@McpPromptParam(name = "sql", description = "The SQL query to optimize, required.", required = true) String sql
2828
) {
2929
StringBuilder promptTemplate = new StringBuilder("""
3030
There is an SQL statement along with its EXPLAIN plan and table schemas.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>com.github.codeboyzhou</groupId>
9+
<artifactId>mcp-server-chat2mysql</artifactId>
10+
<version>1.0.0-SNAPSHOT</version>
11+
</parent>
12+
13+
<artifactId>chat2mysql-native-sdk-example</artifactId>
14+
<packaging>jar</packaging>
15+
16+
<properties>
17+
<java.version>17</java.version>
18+
<maven.compiler.source>${java.version}</maven.compiler.source>
19+
<maven.compiler.target>${java.version}</maven.compiler.target>
20+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
21+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
22+
</properties>
23+
24+
<dependencies>
25+
<dependency>
26+
<groupId>com.github.codeboyzhou</groupId>
27+
<artifactId>chat2mysql-commons</artifactId>
28+
</dependency>
29+
</dependencies>
30+
31+
</project>

0 commit comments

Comments
 (0)