Commit graph quickstart-resources/weather-server-ruby
Author SHA1 Message Date
olaservo
c8139806a7 Require mcp 1.2.0 in the Ruby weather server
Protocol revision 2026-07-28 requires a resultType on every result. The mcp
gem stamps it as of 1.2.0, so a ">= 1.1.0" floor allowed an install whose
responses a 2026-07-28 client rejects outright.

Observed against the test client on 1.1.0:

  Invalid result for tools/list: missing required resultType

On 1.2.0 the same server lists both tools and both structured-content
assertions pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 17:12:18 -07:00
olaservo
c99de72f48 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>
2026-08-16 18:21:18 -07:00
olaservo
f24bf97412 Say "structured content", not "structured output"
The spec never uses the phrase "structured output". It defines two separate
things under Tool Result: "Structured Content" (the `structuredContent` field)
and "Output Schema" (the `outputSchema` field). Collapsing them into
"structured output" conflates the two.

It is also actively confusing here. In LLM tooling "structured output" means
constrained decoding — making the *model* emit conforming JSON. These clients
call a model API, so a reader could reasonably take the phrase to mean the
tool constrains the model's response, which is the opposite of what is going
on: the tool describes the shape of its own result.

Headings and prose now say "structured content". References to real
identifiers are left alone: the Python SDK's own docs page is called
Structured Output and lives at docs/servers/structured-output.md, and its
decorator parameter is `structured_output`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 21:20:39 -07:00
olaservo
b8b3289475 Advertise only the capability this server actually has
The gem's default_capabilities advertises tools, prompts, resources and
logging. This server has only tools; logging is additionally deprecated as of
2026-07-28 (SEP-2577).

Passing capabilities: { tools: {} } makes server/discover honest. No
listChanged flag, because change notifications at this revision are delivered
over subscriptions/listen and this server does not serve it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 21:20:39 -07:00
olaservo
d913f3a150 Add structured output to the Ruby weather server and client
The mcp gem 1.1.0 (2026-08-01) is the first to negotiate 2026-07-28, so the
Ruby examples can finally show the same thing the other four do: get_alerts
declares an array-rooted output_schema and returns a bare top-level JSON
array, get_forecast returns an object. Declaring `type:` at the root is what
suppresses the SDK object-root default.

Failure paths return an error result rather than a bare text one, because a
tool declaring an output_schema MUST return conforming structured content.
No alerts is an empty array, not an error.

The client compiles each declared schema at connect time and validates every
non-error result. The SDK client does not do this itself, so the spec
client-side SHOULD costs real code here, as it does in Go and Rust.

NOT READY TO SHIP. The gem never emits the `resultType` field that the
2026-07-28 schema marks mandatory, and no user-level knob sets it, so a
spec-strict client rejects every response including tools/list. Verified
end-to-end against the Ruby client, which does not check the field; blocked
against the TypeScript SDK client. See the server README.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 21:20:39 -07:00
Alex Akimov
36b6ca4070
Update quickstart URLs (#140) 2026-05-16 08:59:02 -07:00
Koichi ITO
ff32b50499 Add Ruby weather server example
Add a weather server example using the MCP Ruby SDK and the National Weather Service API,
following the same pattern as other language examples.
https://github.com/modelcontextprotocol/ruby-sdk
2026-02-16 19:20:19 +09:00