File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,23 @@ export abstract class ToolBase {
3333 description : this . description ,
3434 } ;
3535
36- if ( this . operationType === "read" || this . operationType === "metadata" ) {
37- annotations . readOnlyHint = true ;
38- annotations . destructiveHint = false ;
39- } else {
40- annotations . destructiveHint = this . operationType === "delete" ;
36+ switch ( this . operationType ) {
37+ case "read" :
38+ case "metadata" :
39+ annotations . readOnlyHint = true ;
40+ annotations . destructiveHint = false ;
41+ break ;
42+ case "delete" :
43+ annotations . readOnlyHint = false ;
44+ annotations . destructiveHint = true ;
45+ break ;
46+ case "create" :
47+ case "update" :
48+ annotations . destructiveHint = false ;
49+ annotations . readOnlyHint = false ;
50+ break ;
51+ default :
52+ break ;
4153 }
4254
4355 return annotations ;
You can’t perform that action at this time.
0 commit comments