Skip to content

Commit bd25675

Browse files
committed
.
Signed-off-by: He-Pin <[email protected]>
1 parent 923b524 commit bd25675

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

mcp-core/src/main/java/io/modelcontextprotocol/spec/McpSchema.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2126,7 +2126,17 @@ public record CallToolAuxResult( // @formatter:off
21262126
@JsonProperty("isError") Boolean isError,
21272127
@JsonProperty("structuredContent") Object structuredContent,
21282128
@JsonProperty("task") Task task,
2129-
@JsonProperty("_meta") Map<String, Object> meta) implements Result {} // @formatter:on
2129+
@JsonProperty("_meta") Map<String, Object> meta) implements Result {
2130+
2131+
public CreateTaskResult toCreateTaskResult() {
2132+
return new CreateTaskResult(task, meta);
2133+
}
2134+
2135+
public CallToolResult toCallToolResult() {
2136+
return new CallToolResult(content, isError, structuredContent, meta);
2137+
}
2138+
2139+
} // @formatter:on
21302140

21312141
/**
21322142
* The server's response to a tools/call request from the client.

0 commit comments

Comments
 (0)