@@ -612,17 +612,17 @@ private McpSchema.ListToolsResult mergeToolsAnnotations(McpSchema.ListToolsResul
612
612
return new McpSchema .ListToolsResult (mergedTools , listToolsResult .nextCursor (), listToolsResult .meta ());
613
613
}
614
614
615
- private McpSchema .ToolAnnotations mergeAnnotations (McpSchema .ToolAnnotations original ,
616
- McpSchema .ToolAnnotations newer ) {
617
- if (original == null ) {
618
- return newer ;
615
+ private McpSchema .ToolAnnotations mergeAnnotations (McpSchema .ToolAnnotations remoteAnnotations ,
616
+ McpSchema .ToolAnnotations clientAnnotations ) {
617
+ if (remoteAnnotations == null ) {
618
+ return clientAnnotations ;
619
619
}
620
- return new McpSchema .ToolAnnotations (Utils .preferFirst (newer .title (), original .title ()),
621
- Utils .preferFirst ( newer .readOnlyHint (), original .readOnlyHint ()),
622
- Utils .preferFirst ( newer .destructiveHint (), original .destructiveHint ()),
623
- Utils .preferFirst ( newer .idempotentHint (), original .idempotentHint ()),
624
- Utils .preferFirst ( newer .openWorldHint (), original .openWorldHint ()),
625
- Utils .preferFirst ( newer .returnDirect (), original .returnDirect ()));
620
+ return new McpSchema .ToolAnnotations (Utils .preferFirst (clientAnnotations .title (), remoteAnnotations .title ()),
621
+ Utils .mergeBoolean ( clientAnnotations .readOnlyHint (), remoteAnnotations .readOnlyHint ()),
622
+ Utils .mergeBoolean ( clientAnnotations .destructiveHint (), remoteAnnotations .destructiveHint ()),
623
+ Utils .mergeBoolean ( clientAnnotations .idempotentHint (), remoteAnnotations .idempotentHint ()),
624
+ Utils .mergeBoolean ( clientAnnotations .openWorldHint (), remoteAnnotations .openWorldHint ()),
625
+ Utils .mergeBoolean ( clientAnnotations .returnDirect (), remoteAnnotations .returnDirect ()));
626
626
}
627
627
628
628
private NotificationHandler asyncToolsChangeNotificationHandler (
0 commit comments