Skip to content

Commit 1daca39

Browse files
committed
feat(test): Add TestMcpPrompts class
1 parent 066fd27 commit 1daca39

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.github.codeboyzhou.mcp.declarative.server;
2+
3+
import com.github.codeboyzhou.mcp.declarative.annotation.McpPrompt;
4+
import com.github.codeboyzhou.mcp.declarative.annotation.McpPromptParam;
5+
import com.github.codeboyzhou.mcp.declarative.annotation.McpPrompts;
6+
7+
@McpPrompts
8+
public class TestMcpPrompts {
9+
10+
@McpPrompt(name = "prompt1", description = "prompt1")
11+
public static String prompt1(
12+
@McpPromptParam(name = "name", description = "name", required = true) String name,
13+
@McpPromptParam(name = "version", description = "version", required = true) String version
14+
) {
15+
return "Hello " + name + ", I am " + version;
16+
}
17+
18+
@McpPrompt(description = "prompt2")
19+
public static String prompt2(
20+
@McpPromptParam(name = "name", description = "name") String name,
21+
@McpPromptParam(name = "version", description = "version") String version
22+
) {
23+
return "Hello " + name + ", I am " + version;
24+
}
25+
26+
}

0 commit comments

Comments
 (0)