File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed
integration/mcp/src/main/kotlin/com/javaaidev/easyllmtools/integration/mcp Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 13
13
import java .util .Map ;
14
14
import reactor .core .publisher .Mono ;
15
15
16
+ /**
17
+ * Helper class for integration with MCP
18
+ */
16
19
public class McpToolHelper {
17
20
18
21
private final ToolInvoker toolInvoker = new ToolInvoker ();
19
22
23
+ /**
24
+ * Convert a tool to MCP sync tool
25
+ *
26
+ * @param tool Tool
27
+ * @return MCP sync tool
28
+ */
20
29
public McpServerFeatures .SyncToolSpecification toSyncTool (Tool tool ) {
21
30
return new SyncToolSpecification (
22
31
fromTool (tool ), (exchange , args ) -> callTool (tool , args )
23
32
);
24
33
}
25
34
35
+ /**
36
+ * Convert a tool to MCP async tool
37
+ *
38
+ * @param tool Tool
39
+ * @return MCP async tool
40
+ */
26
41
public McpServerFeatures .AsyncToolSpecification toAsyncTool (Tool tool ) {
27
42
return new AsyncToolSpecification (
28
43
fromTool (tool ),
Original file line number Diff line number Diff line change 186
186
<execution >
187
187
<phase >package</phase >
188
188
<goals >
189
- <goal >javadocJar </goal >
189
+ <goal >dokka </goal >
190
190
</goals >
191
191
</execution >
192
192
</executions >
199
199
</pluginsConfiguration >
200
200
</configuration >
201
201
</plugin >
202
+ <plugin >
203
+ <groupId >org.apache.maven.plugins</groupId >
204
+ <artifactId >maven-jar-plugin</artifactId >
205
+ <version >3.3.0</version >
206
+ <executions >
207
+ <execution >
208
+ <id >dokka-jar</id >
209
+ <phase >package</phase >
210
+ <goals >
211
+ <goal >jar</goal >
212
+ </goals >
213
+ <configuration >
214
+ <classifier >javadoc</classifier >
215
+ <classesDirectory >${project.build.directory} /dokka</classesDirectory >
216
+ <skipIfEmpty >true</skipIfEmpty >
217
+ </configuration >
218
+ </execution >
219
+ </executions >
220
+ </plugin >
202
221
<plugin >
203
222
<groupId >org.apache.maven.plugins</groupId >
204
223
<artifactId >maven-gpg-plugin</artifactId >
246
265
<groupId >org.jetbrains.dokka</groupId >
247
266
<artifactId >dokka-maven-plugin</artifactId >
248
267
</plugin >
268
+ <plugin >
269
+ <groupId >org.apache.maven.plugins</groupId >
270
+ <artifactId >maven-jar-plugin</artifactId >
271
+ </plugin >
249
272
<plugin >
250
273
<groupId >org.apache.maven.plugins</groupId >
251
274
<artifactId >maven-gpg-plugin</artifactId >
You can’t perform that action at this time.
0 commit comments