Skip to content

Commit 81eb55e

Browse files
authored
mcp: change default-true fields to pointers (#44)
Some logically boolean fields default to true. We cannot use bool for these fields, because it defaults to false. So use *bool.
1 parent 376d949 commit 81eb55e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mcp/protocol.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ type ToolAnnotations struct {
789789
// (This property is meaningful only when `readOnlyHint == false`)
790790
//
791791
// Default: true
792-
DestructiveHint bool `json:"destructiveHint,omitempty"`
792+
DestructiveHint *bool `json:"destructiveHint,omitempty"`
793793
// If true, calling the tool repeatedly with the same arguments will have no
794794
// additional effect on the its environment.
795795
//
@@ -802,7 +802,7 @@ type ToolAnnotations struct {
802802
// a web search tool is open, whereas that of a memory tool is not.
803803
//
804804
// Default: true
805-
OpenWorldHint bool `json:"openWorldHint,omitempty"`
805+
OpenWorldHint *bool `json:"openWorldHint,omitempty"`
806806
// If true, the tool does not modify its environment.
807807
//
808808
// Default: false

0 commit comments

Comments
 (0)