docs 补充项目注释
This commit is contained in:
@@ -16,16 +16,19 @@
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MCP 服务端 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.ai</groupId>
|
||||
<artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- MCP 客户端 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.ai</groupId>
|
||||
<artifactId>spring-ai-starter-mcp-client</artifactId>
|
||||
|
||||
+7
@@ -14,6 +14,13 @@ public record McpResourceReadResult(
|
||||
List<McpSchema.ResourceContents> contents
|
||||
) {
|
||||
|
||||
/**
|
||||
* 将 MCP SDK 资源读取结果转换为带服务端名称的项目结果对象。
|
||||
*
|
||||
* @param serverName MCP 服务端名称
|
||||
* @param result MCP SDK 资源读取结果
|
||||
* @return MCP 资源读取结果
|
||||
*/
|
||||
public static McpResourceReadResult of(String serverName, McpSchema.ReadResourceResult result) {
|
||||
return new McpResourceReadResult(serverName, result.contents());
|
||||
}
|
||||
|
||||
+7
@@ -16,6 +16,13 @@ public record McpToolCallResult(
|
||||
Object structuredContent
|
||||
) {
|
||||
|
||||
/**
|
||||
* 将 MCP SDK 工具调用结果转换为带服务端名称的项目结果对象。
|
||||
*
|
||||
* @param serverName MCP 服务端名称
|
||||
* @param result MCP SDK 工具调用结果
|
||||
* @return MCP 工具调用结果
|
||||
*/
|
||||
public static McpToolCallResult of(String serverName, McpSchema.CallToolResult result) {
|
||||
return new McpToolCallResult(
|
||||
serverName,
|
||||
|
||||
Reference in New Issue
Block a user