Skip to content

Commit 1fef844

Browse files
committed
mcp: change default-true fields to pointers
Some logically boolean fields default to true. We cannot use `bool` for these fields, because it defaults to false. So use `*bool`. Fixes #40.
1 parent 09181c2 commit 1fef844

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
@@ -770,7 +770,7 @@ type ToolAnnotations struct {
770770
// (This property is meaningful only when `readOnlyHint == false`)
771771
//
772772
// Default: true
773-
DestructiveHint bool `json:"destructiveHint,omitempty"`
773+
DestructiveHint *bool `json:"destructiveHint,omitempty"`
774774
// If true, calling the tool repeatedly with the same arguments will have no
775775
// additional effect on the its environment.
776776
//
@@ -783,7 +783,7 @@ type ToolAnnotations struct {
783783
// a web search tool is open, whereas that of a memory tool is not.
784784
//
785785
// Default: true
786-
OpenWorldHint bool `json:"openWorldHint,omitempty"`
786+
OpenWorldHint *bool `json:"openWorldHint,omitempty"`
787787
// If true, the tool does not modify its environment.
788788
//
789789
// Default: false

0 commit comments

Comments
 (0)