Skip to content

Commit 8c9a158

Browse files
Drop TS/C# reference from MCPStdioServerConfig doc comment
Go SDK source shouldn't reference other-language SDKs. Rephrase the Tools field doc to explain the pointer-to-slice form purely in Go terms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent eb6560f commit 8c9a158

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

go/types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,9 +654,9 @@ type MCPServerConfig interface {
654654
// - &[]string{}: no tools
655655
// - &[]string{"foo","bar"}: only those tools
656656
//
657-
// The pointer-to-slice form is required to distinguish "omitted" (all tools)
658-
// from "empty list" (no tools) on the wire, matching TypeScript's
659-
// `tools?: string[]` and C#'s `IList<string>?` semantics.
657+
// The pointer-to-slice form is required so that a nil pointer (omitted from
658+
// the wire) is distinguishable from a non-nil pointer to an empty slice
659+
// (sent as `"tools": []`).
660660
type MCPStdioServerConfig struct {
661661
Tools *[]string `json:"tools,omitempty"`
662662
Timeout int `json:"timeout,omitempty"`

0 commit comments

Comments
 (0)