@@ -718,18 +718,37 @@ public record JsonSchema( // @formatter:off
718
718
* @param inputSchema A JSON Schema object that describes the expected structure of
719
719
* the arguments when calling this tool. This allows clients to validate tool
720
720
* arguments before sending them to the server.
721
+ * @param title A human-readable title for the tool. Intended for display purposes and
722
+ * not guaranteed to reflect actual tool behavior.
723
+ * @param readOnlyHint If true, the tool does not modify its environment. This is a
724
+ * hint and may not reflect the tool's actual behavior.
725
+ * @param destructiveHint If true, the tool may perform destructive updates to its
726
+ * environment if false, it only performs additive updates. Applicable only when
727
+ * {@code readOnlyHint == false}.
728
+ * @param idempotentHint If true, repeated calls to the tool with the same arguments
729
+ * have no additional effects. Applicable only when {@code readOnlyHint == false}.
730
+ * @param openWorldHint If true, the tool interacts with an open world of external
731
+ * entities (e.g., web search); if false, the domain is closed (e.g., memory tools).
721
732
*/
722
733
@ JsonInclude (JsonInclude .Include .NON_ABSENT )
723
734
@ JsonIgnoreProperties (ignoreUnknown = true )
724
735
public record Tool ( // @formatter:off
725
736
@ JsonProperty ("name" ) String name ,
726
737
@ JsonProperty ("description" ) String description ,
727
- @ JsonProperty ("inputSchema" ) JsonSchema inputSchema ) {
738
+ @ JsonProperty ("inputSchema" ) JsonSchema inputSchema ,
739
+ @ JsonProperty ("title" ) String title ,
740
+ @ JsonProperty ("readOnlyHint" ) Boolean readOnlyHint ,
741
+ @ JsonProperty ("destructiveHint" ) Boolean destructiveHint ,
742
+ @ JsonProperty ("idempotentHint" ) Boolean idempotentHint ,
743
+ @ JsonProperty ("openWorldHint" ) Boolean openWorldHint ) {
728
744
729
745
public Tool (String name , String description , String schema ) {
730
- this (name , description , parseSchema (schema ));
746
+ this (name , description , parseSchema (schema ), null , null , null , null , null );
747
+ }
748
+
749
+ public Tool (String name , String description , String schema , String title , Boolean readOnlyHint , Boolean destructiveHint , Boolean idempotentHint , Boolean openWorldHint ) {
750
+ this (name , description , parseSchema (schema ), title , readOnlyHint , destructiveHint , idempotentHint , openWorldHint );
731
751
}
732
-
733
752
} // @formatter:on
734
753
735
754
private static JsonSchema parseSchema (String schema ) {
0 commit comments