File tree Expand file tree Collapse file tree
integration/mcp/src/main/kotlin/com/javaaidev/easyllmtools/integration/mcp Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313import java .util .Map ;
1414import reactor .core .publisher .Mono ;
1515
16+ /**
17+ * Helper class for integration with MCP
18+ */
1619public class McpToolHelper {
1720
1821 private final ToolInvoker toolInvoker = new ToolInvoker ();
1922
23+ /**
24+ * Convert a tool to MCP sync tool
25+ *
26+ * @param tool Tool
27+ * @return MCP sync tool
28+ */
2029 public McpServerFeatures .SyncToolSpecification toSyncTool (Tool tool ) {
2130 return new SyncToolSpecification (
2231 fromTool (tool ), (exchange , args ) -> callTool (tool , args )
2332 );
2433 }
2534
35+ /**
36+ * Convert a tool to MCP async tool
37+ *
38+ * @param tool Tool
39+ * @return MCP async tool
40+ */
2641 public McpServerFeatures .AsyncToolSpecification toAsyncTool (Tool tool ) {
2742 return new AsyncToolSpecification (
2843 fromTool (tool ),
Original file line number Diff line number Diff line change 186186 <execution >
187187 <phase >package</phase >
188188 <goals >
189- <goal >javadocJar </goal >
189+ <goal >dokka </goal >
190190 </goals >
191191 </execution >
192192 </executions >
199199 </pluginsConfiguration >
200200 </configuration >
201201 </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 >
202221 <plugin >
203222 <groupId >org.apache.maven.plugins</groupId >
204223 <artifactId >maven-gpg-plugin</artifactId >
246265 <groupId >org.jetbrains.dokka</groupId >
247266 <artifactId >dokka-maven-plugin</artifactId >
248267 </plugin >
268+ <plugin >
269+ <groupId >org.apache.maven.plugins</groupId >
270+ <artifactId >maven-jar-plugin</artifactId >
271+ </plugin >
249272 <plugin >
250273 <groupId >org.apache.maven.plugins</groupId >
251274 <artifactId >maven-gpg-plugin</artifactId >
You can’t perform that action at this time.
0 commit comments