Link the dated spec revision, not /draft
The surrounding sentence names 2026-07-28 as the revision that first allows an array-rooted schema, but the link pointed at /draft, which moves on to the next revision and stops matching the claim. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
a0ce1f89be
commit
1e6af8799a
2 changed files with 2 additions and 2 deletions
|
|
@ -6,4 +6,4 @@ See the [Build an MCP client](https://modelcontextprotocol.io/docs/develop/build
|
|||
|
||||
The SDK does not validate tool output, so this client compiles each declared `outputSchema` at connect time and checks results against it — the spec's client-side SHOULD. It uses [`jsonschema-go`](https://pkg.go.dev/github.com/google/jsonschema-go/jsonschema), already an SDK dependency.
|
||||
|
||||
The two channels go to different readers: `Content` is forwarded to the model, while `StructuredContent` is used as data — the client counts the items it returns. See [Structured Content](https://modelcontextprotocol.io/specification/draft/server/tools#structured-content).
|
||||
The two channels go to different readers: `Content` is forwarded to the model, while `StructuredContent` is used as data — the client counts the items it returns. See [Structured Content](https://modelcontextprotocol.io/specification/2026-07-28/server/tools#structured-content).
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ The server will communicate via stdio and expose two MCP tools:
|
|||
|
||||
## Structured content
|
||||
|
||||
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.
|
||||
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/2026-07-28/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.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue