From 3e8e8004b88f28982e54478b7c0824d946a11eab Mon Sep 17 00:00:00 2001 From: Sam Morrow Date: Wed, 7 Jan 2026 16:13:18 +0100 Subject: [PATCH] mcp: change CompleteParams.Context from pointer to value type CompleteContext contains only a map field which is safe at its zero value. A pointer type forces unnecessary nil checks and has caused panics in production when clients omit the optional context field. --- mcp/protocol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcp/protocol.go b/mcp/protocol.go index 26c8982f..fa155eda 100644 --- a/mcp/protocol.go +++ b/mcp/protocol.go @@ -329,7 +329,7 @@ type CompleteParams struct { Meta `json:"_meta,omitempty"` // The argument's information Argument CompleteParamsArgument `json:"argument"` - Context *CompleteContext `json:"context,omitempty"` + Context CompleteContext `json:"context"` Ref *CompleteReference `json:"ref"` }