ruby-sdk/lib/mcp
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Koichi ITO 99cbefc610 Allow $ref in Tool::Schema for protocol version 2025-11-25
`Tool::Schema` rejected `$ref` with an `ArgumentError`.
Earlier MCP spec versions (2024-11-05 through 2025-06-18) did not define
a JSON Schema dialect or reference the `$ref` keyword. `inputSchema` was described
only as "JSON Schema defining expected parameters" with no further constraints:

- https://modelcontextprotocol.io/specification/2024-11-05/server/tools
- https://modelcontextprotocol.io/specification/2025-06-18/server/tools

The MCP spec 2025-11-25 introduced a "JSON Schema Usage" section that adopts
JSON Schema 2020-12 as the default dialect. Since `$ref` is a core keyword in 2020-12,
it is now allowed for protocol version 2025-11-25 and later.

- https://modelcontextprotocol.io/specification/2025-11-25/basic#json-schema-usage
- https://modelcontextprotocol.io/specification/2025-11-25/server/tools
- https://json-schema.org/draft/2020-12/release-notes

For backward compatibility with older protocol versions (2025-06-18 and earlier),
`Server#validate!` continues to raise `ArgumentError` when a tool input schema contains `$ref`.
This preserves the existing behavior for servers targeting those spec versions.
2026-02-27 14:33:36 +09:00
..
client Add Accept header validation 2026-01-07 14:55:19 +09:00
prompt Support Ruby 2.7 - Ruby 3.1 2026-01-06 10:38:56 +09:00
resource Fix Resource::Contents#to_h to use correct property names per MCP spec 2026-02-19 13:50:10 +09:00
server Merge pull request #207 from keisku/add-Accept-header-validation 2026-01-08 02:49:19 +09:00
tool Allow $ref in Tool::Schema for protocol version 2025-11-25 2026-02-27 14:33:36 +09:00
transports Add a migration path for Server::Transports::StdioTransport 2025-06-10 16:27:22 +09:00
annotations.rb Extract MCP::Annotations into a dedicated file 2026-02-03 15:38:04 +09:00
client.rb Add resource_templates to MCP::Client 2026-02-05 16:02:07 -05:00
configuration.rb Support Ruby 2.7 - Ruby 3.1 2026-01-06 10:38:56 +09:00
content.rb Support Ruby 2.7 - Ruby 3.1 2026-01-06 10:38:56 +09:00
icon.rb Support icons parameter 2025-12-30 05:35:22 +09:00
instrumentation.rb Support Ruby 2.7 - Ruby 3.1 2026-01-06 10:38:56 +09:00
logging_message_notification.rb logging_message_notification: Remove unused require 2026-02-05 16:05:08 -05:00
methods.rb Add Elicitation skeleton 2025-11-21 02:42:20 +09:00
prompt.rb Omit icons from responses when empty or nil 2026-01-12 09:46:45 +09:00
resource.rb Omit icons from responses when empty or nil 2026-01-12 09:46:45 +09:00
resource_template.rb Omit icons from responses when empty or nil 2026-01-12 09:46:45 +09:00
server.rb Allow $ref in Tool::Schema for protocol version 2025-11-25 2026-02-27 14:33:36 +09:00
string_utils.rb Fix ReDoS vulnerability in StringUtils#underscore 2026-01-09 01:14:52 +09:00
tool.rb Omit icons from responses when empty or nil 2026-01-12 09:46:45 +09:00
transport.rb Addressing feedback 2025-06-11 13:44:54 -07:00
version.rb Release 0.7.1 2026-02-21 03:33:28 +09:00