Skip to content

Commit 0467cc0

Browse files
Merge pull request #23983 from opf/dependabot/bundler/dev/mcp-0.20.0
Bump mcp from 0.18.0 to 0.20.0
2 parents 7f98523 + e399063 commit 0467cc0

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ gem "ttfunk", "~> 1.7.0" # remove after https://github.com/prawnpdf/prawn/issues
162162
# prawn implicitly depends on matrix gem no longer in ruby core with 3.1
163163
gem "matrix", "~> 0.4.3"
164164

165-
gem "mcp", "~> 0.18.0"
165+
gem "mcp", "~> 0.20.0"
166166

167167
gem "meta-tags", "~> 2.23.0"
168168

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,8 @@ GEM
836836
marcel (1.0.4)
837837
markly (0.16.0)
838838
matrix (0.4.3)
839-
mcp (0.18.0)
840-
json-schema (>= 4.1)
839+
mcp (0.20.0)
840+
json_schemer (>= 2.4)
841841
messagebird-rest (5.0.0)
842842
jwt (< 4)
843843
meta-tags (2.23.0)
@@ -1664,7 +1664,7 @@ DEPENDENCIES
16641664
mail (= 2.9.0)
16651665
markly (~> 0.15)
16661666
matrix (~> 0.4.3)
1667-
mcp (~> 0.18.0)
1667+
mcp (~> 0.20.0)
16681668
md_to_pdf!
16691669
meta-tags (~> 2.23.0)
16701670
mini_magick (~> 5.3.0)
@@ -2023,7 +2023,7 @@ CHECKSUMS
20232023
marcel (1.0.4) sha256=0d5649feb64b8f19f3d3468b96c680bae9746335d02194270287868a661516a4
20242024
markly (0.16.0) sha256=6f70d79e385b1efc9e171f74c81628826259039fe6c778e03c3924c71dac5511
20252025
matrix (0.4.3) sha256=a0d5ab7ddcc1973ff690ab361b67f359acbb16958d1dc072b8b956a286564c5b
2026-
mcp (0.18.0) sha256=4d8ec572c1536f53370196539d5272355fb6480ed969ea58a8d24917ee2562c8
2026+
mcp (0.20.0) sha256=6b71bfc9a19f6dca34953bded1bd89cba75176a4f8bb293ce82ace065af584f9
20272027
md_to_pdf (0.2.6)
20282028
messagebird-rest (5.0.0) sha256=da4cc1efba3d5e4aa021fad07426c2cb6b326ce5670da5104bb8f6056a39d59c
20292029
meta-tags (2.23.0) sha256=ffe78b5bee398de4ff5ac3316f5a786049538a651643b8476def06c3acc762c1

app/services/mcp_tools/base.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ def handle_request(**)
174174
if Rails.env.local? && @tool_context.output_schema
175175
# We are only validating the output during development, so we can see errors during dev, but do not break the
176176
# API in production due to minor schema differences.
177-
@tool_context.output_schema.validate_result(result.to_json)
178-
validate_root_output_schema!(@tool_context.output_schema)
177+
@tool_context.output_schema.validate_result(JSON.parse(result.to_json))
179178
end
180179

181180
format_response(result)
@@ -206,13 +205,6 @@ def current_user
206205
@server_context[:current_user]
207206
end
208207

209-
def validate_root_output_schema!(output_schema)
210-
root_type = output_schema.schema.fetch(:type, "object")
211-
return if root_type == "object"
212-
213-
raise "MCP tools must respond with a JSON object as the root element. #{self.class} responds in #{root_type}."
214-
end
215-
216208
def render_plain_content?
217209
%i[full content_only].include?(Setting.mcp_tool_response_format)
218210
end

0 commit comments

Comments
 (0)