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.
This commit is contained in:
Jonathan Amsterdam 2025-06-25 17:37:45 -04:00 • committed by GitHub
commit 81eb55e6bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -789,7 +789,7 @@ type ToolAnnotations struct {
// (This property is meaningful only when `readOnlyHint == false`) // (This property is meaningful only when `readOnlyHint == false`)
// //
// Default: true // Default: true
DestructiveHint bool `json:"destructiveHint,omitempty"` DestructiveHint *bool `json:"destructiveHint,omitempty"`
// If true, calling the tool repeatedly with the same arguments will have no // If true, calling the tool repeatedly with the same arguments will have no
// additional effect on the its environment. // additional effect on the its environment.
// //
@ -802,7 +802,7 @@ type ToolAnnotations struct {
// a web search tool is open, whereas that of a memory tool is not. // a web search tool is open, whereas that of a memory tool is not.
// //
// Default: true // Default: true
OpenWorldHint bool `json:"openWorldHint,omitempty"` OpenWorldHint *bool `json:"openWorldHint,omitempty"`
// If true, the tool does not modify its environment. // If true, the tool does not modify its environment.
// //
// Default: false // Default: false