Skip to content

Commit f454be8

Browse files
committed
Review comments.
Signed-off-by: Santiago Pericas-Geertsen <[email protected]>
1 parent 6dd792d commit f454be8

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

examples/calendar/src/main/java/io/helidon/extensions/mcp/examples/calendar/ListCalendarEventTool.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ final class ListCalendarEventTool implements McpTool {
3939
"description": "Event date in the following format YYYY-MM-DD",
4040
"type": "string"
4141
}
42-
},
43-
"required": [ ]
42+
}
4443
}
4544
""";
4645

server/src/main/java/io/helidon/extensions/mcp/server/McpServerFeature.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,12 +387,6 @@ private void notificationCancelRpc(JsonRpcRequest req, JsonRpcResponse res) {
387387
private void initializeRpc(JsonRpcRequest req, JsonRpcResponse res) {
388388
Optional<McpSession> foundSession = findSession(req);
389389

390-
// log initial request
391-
if (LOGGER.isLoggable(Level.FINEST)) {
392-
LOGGER.log(Level.FINEST, "Request:\n" + prettyPrint(req.asJsonObject()));
393-
LOGGER.log(Level.FINEST, "Response:\n" + prettyPrint(res.asJsonObject()));
394-
}
395-
396390
// is this streamable HTTP?
397391
if (foundSession.isEmpty()) {
398392
// create a new session
@@ -425,6 +419,12 @@ private void initializeRpc(JsonRpcRequest req, JsonRpcResponse res) {
425419
LOGGER.log(Level.FINEST, "SSE transport");
426420
session.send(res);
427421
}
422+
423+
// log initial request
424+
if (LOGGER.isLoggable(Level.FINEST)) {
425+
LOGGER.log(Level.FINEST, "Request:\n" + prettyPrint(req.asJsonObject()));
426+
LOGGER.log(Level.FINEST, "Response:\n" + prettyPrint(res.asJsonObject()));
427+
}
428428
}
429429

430430
private String parseClientVersion(McpParameters parameters) {

0 commit comments

Comments
 (0)