From 81eb55e6bca8a08888248fe3af0ab17f5319c0fc Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Wed, 25 Jun 2025 17:37:45 -0400 Subject: [PATCH] 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. --- mcp/protocol.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcp/protocol.go b/mcp/protocol.go index 6b6f479..8c0a176 100644 --- a/mcp/protocol.go +++ b/mcp/protocol.go @@ -789,7 +789,7 @@ type ToolAnnotations struct { // (This property is meaningful only when `readOnlyHint == false`) // // 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 // 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. // // Default: true - OpenWorldHint bool `json:"openWorldHint,omitempty"` + OpenWorldHint *bool `json:"openWorldHint,omitempty"` // If true, the tool does not modify its environment. // // Default: false