diff --git a/mcp-client-go/go.mod b/mcp-client-go/go.mod index 5389f24..6b54888 100644 --- a/mcp-client-go/go.mod +++ b/mcp-client-go/go.mod @@ -6,7 +6,7 @@ require ( github.com/anthropics/anthropic-sdk-go v1.14.0 github.com/google/jsonschema-go v0.4.3 github.com/joho/godotenv v1.5.1 - github.com/modelcontextprotocol/go-sdk v1.7.0-pre.3 + github.com/modelcontextprotocol/go-sdk v1.7.0 ) require ( diff --git a/mcp-client-go/go.sum b/mcp-client-go/go.sum index 4309c98..a4e9a6c 100644 --- a/mcp-client-go/go.sum +++ b/mcp-client-go/go.sum @@ -10,8 +10,8 @@ github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+ github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/modelcontextprotocol/go-sdk v1.7.0-pre.3 h1:SEAY9IduDif4iApnZgpFkjFIdo3askSGZVbZIYyTy6I= -github.com/modelcontextprotocol/go-sdk v1.7.0-pre.3/go.mod h1:dL7u98E/zjJTGzEq+j30jQ8K2k1mb6LeAH4inEcSGts= +github.com/modelcontextprotocol/go-sdk v1.7.0 h1:yqjY2dsbKAC0LSuWZVBMrHgiG8ukXv6NRo0JiALay44= +github.com/modelcontextprotocol/go-sdk v1.7.0/go.mod h1:dL7u98E/zjJTGzEq+j30jQ8K2k1mb6LeAH4inEcSGts= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= diff --git a/mcp-client-go/mcp-client-go.exe b/mcp-client-go/mcp-client-go.exe deleted file mode 100644 index b063e0c..0000000 Binary files a/mcp-client-go/mcp-client-go.exe and /dev/null differ diff --git a/weather-server-go/README.md b/weather-server-go/README.md index 563e3d8..f1e92c7 100644 --- a/weather-server-go/README.md +++ b/weather-server-go/README.md @@ -20,6 +20,8 @@ The server will communicate via stdio and expose two MCP tools: ## Structured output -Both tools declare an `OutputSchema` and return `StructuredContent`. `get_forecast` returns an object; `get_alerts` returns a top-level JSON array, which protocol revision `2026-07-28` is the first to allow — see [Structured Content](https://modelcontextprotocol.io/specification/draft/server/tools#structured-content) in the spec. +Both tools advertise an `outputSchema` and return `StructuredContent`. `get_forecast` returns an object; `get_alerts` returns a top-level JSON array, which protocol revision `2026-07-28` is the first to allow — see [Structured Content](https://modelcontextprotocol.io/specification/draft/server/tools#structured-content) in the spec. + +`get_forecast` sets no `OutputSchema` on the `Tool`: the SDK infers one from the handler's return type, which is the idiomatic Go spelling. `get_alerts` overrides it, because inference widens a slice to `["null", "array"]` — a nil slice marshals to `null` — and the tool never returns nil. Note that an array-rooted schema requires a `2026-07-28` client: the SDK sends it as written on every connection rather than projecting it down, so an older client rejects the tool list. diff --git a/weather-server-go/go.mod b/weather-server-go/go.mod index 4daccb5..50bb538 100644 --- a/weather-server-go/go.mod +++ b/weather-server-go/go.mod @@ -4,7 +4,7 @@ go 1.25.1 require ( github.com/google/jsonschema-go v0.4.3 - github.com/modelcontextprotocol/go-sdk v1.7.0-pre.3 + github.com/modelcontextprotocol/go-sdk v1.7.0 ) require ( diff --git a/weather-server-go/go.sum b/weather-server-go/go.sum index 2df2cbe..f93aba1 100644 --- a/weather-server-go/go.sum +++ b/weather-server-go/go.sum @@ -4,8 +4,8 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/jsonschema-go v0.4.3 h1:/DBOLZTfDow7pe2GmaJNhltueGTtDKICi8V8p+DQPd0= github.com/google/jsonschema-go v0.4.3/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE= -github.com/modelcontextprotocol/go-sdk v1.7.0-pre.3 h1:SEAY9IduDif4iApnZgpFkjFIdo3askSGZVbZIYyTy6I= -github.com/modelcontextprotocol/go-sdk v1.7.0-pre.3/go.mod h1:dL7u98E/zjJTGzEq+j30jQ8K2k1mb6LeAH4inEcSGts= +github.com/modelcontextprotocol/go-sdk v1.7.0 h1:yqjY2dsbKAC0LSuWZVBMrHgiG8ukXv6NRo0JiALay44= +github.com/modelcontextprotocol/go-sdk v1.7.0/go.mod h1:dL7u98E/zjJTGzEq+j30jQ8K2k1mb6LeAH4inEcSGts= github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= github.com/segmentio/encoding v0.5.4 h1:OW1VRern8Nw6ITAtwSZ7Idrl3MXCFwXHPgqESYfvNt0= diff --git a/weather-server-go/weather.exe b/weather-server-go/weather.exe deleted file mode 100644 index 2484162..0000000 Binary files a/weather-server-go/weather.exe and /dev/null differ