@@ -45,10 +45,16 @@ public interface Tool {
4545 @ JsonIgnore
4646 String getType ();
4747
48- default Boolean hidden () {
48+ default boolean hidden () {
4949 return false ;
5050 }
5151
52+ default boolean inherit () {
53+ return false ;
54+ }
55+
56+ default void toInherit () {}
57+
5258 default ToolDefinition definition () {
5359 return null ;
5460 }
@@ -79,12 +85,16 @@ class Retrieval implements Tool {
7985 @ JsonInclude (JsonInclude .Include .NON_NULL )
8086 private Boolean hidden ;
8187
88+ @ JsonInclude (JsonInclude .Include .NON_NULL )
89+ private Boolean inherit ;
90+
8291 public Retrieval () {
8392
8493 }
8594
86- public Retrieval (Boolean hidden ) {
95+ public Retrieval (Boolean hidden , Boolean inherit ) {
8796 this .hidden = hidden ;
97+ this .inherit = inherit ;
8898 }
8999
90100 @ Override
@@ -100,9 +110,19 @@ public ToolDefinition definition() {
100110 }
101111
102112 @ Override
103- public Boolean hidden () {
113+ public boolean hidden () {
104114 return Boolean .TRUE == hidden ;
105115 }
116+
117+ @ Override
118+ public boolean inherit () {
119+ return Boolean .TRUE == inherit ;
120+ }
121+
122+ @ Override
123+ public void toInherit () {
124+ setInherit (true );
125+ }
106126 }
107127
108128 /**
@@ -276,12 +296,16 @@ class ReadFiles implements Tool {
276296 @ JsonInclude (JsonInclude .Include .NON_NULL )
277297 private Boolean hidden ;
278298
299+ @ JsonInclude (JsonInclude .Include .NON_NULL )
300+ private Boolean inherit ;
301+
279302 public ReadFiles () {
280303
281304 }
282305
283- public ReadFiles (Boolean hidden ) {
306+ public ReadFiles (Boolean hidden , Boolean inherit ) {
284307 this .hidden = hidden ;
308+ this .inherit = inherit ;
285309 }
286310
287311 @ Override
@@ -290,9 +314,19 @@ public String getType() {
290314 }
291315
292316 @ Override
293- public Boolean hidden () {
317+ public boolean hidden () {
294318 return Boolean .TRUE == hidden ;
295319 }
320+
321+ @ Override
322+ public boolean inherit () {
323+ return Boolean .TRUE == inherit ;
324+ }
325+
326+ @ Override
327+ public void toInherit () {
328+ setInherit (true );
329+ }
296330 }
297331
298332 /**
0 commit comments