@@ -750,16 +750,36 @@ public record JsonSchema( // @formatter:off
750750 * @param inputSchema A JSON Schema object that describes the expected structure of
751751 * the arguments when calling this tool. This allows clients to validate tool
752752 * arguments before sending them to the server.
753+ * @param title A human-readable title for the tool. Intended for display purposes and
754+ * not guaranteed to reflect actual tool behavior.
755+ * @param readOnlyHint If true, the tool does not modify its environment. This is a
756+ * hint and may not reflect the tool's actual behavior.
757+ * @param destructiveHint If true, the tool may perform destructive updates to its
758+ * environment if false, it only performs additive updates. Applicable only when
759+ * {@code readOnlyHint == false}.
760+ * @param idempotentHint If true, repeated calls to the tool with the same arguments
761+ * have no additional effects. Applicable only when {@code readOnlyHint == false}.
762+ * @param openWorldHint If true, the tool interacts with an open world of external
763+ * entities (e.g., web search); if false, the domain is closed (e.g., memory tools).
753764 */
754765 @ JsonInclude (JsonInclude .Include .NON_ABSENT )
755766 @ JsonIgnoreProperties (ignoreUnknown = true )
756767 public record Tool ( // @formatter:off
757768 @ JsonProperty ("name" ) String name ,
758769 @ JsonProperty ("description" ) String description ,
759- @ JsonProperty ("inputSchema" ) JsonSchema inputSchema ) {
760-
770+ @ JsonProperty ("inputSchema" ) JsonSchema inputSchema ,
771+ @ JsonProperty ("title" ) String title ,
772+ @ JsonProperty ("readOnlyHint" ) Boolean readOnlyHint ,
773+ @ JsonProperty ("destructiveHint" ) Boolean destructiveHint ,
774+ @ JsonProperty ("idempotentHint" ) Boolean idempotentHint ,
775+ @ JsonProperty ("openWorldHint" ) Boolean openWorldHint ) {
776+
761777 public Tool (String name , String description , String schema ) {
762- this (name , description , parseSchema (schema ));
778+ this (name , description , parseSchema (schema ), null , null , null , null , null );
779+ }
780+
781+ public Tool (String name , String description , String schema , String title , Boolean readOnlyHint , Boolean destructiveHint , Boolean idempotentHint , Boolean openWorldHint ) {
782+ this (name , description , parseSchema (schema ), title , readOnlyHint , destructiveHint , idempotentHint , openWorldHint );
763783 }
764784
765785 } // @formatter:on
0 commit comments