Skip to content

Commit 5cd3ed7

Browse files
authored
Update metaschema URI format in input_schema.rb
Fixes #131. Tested on Windows and Linux. Added a "file://" prefix to prevent the JSON library from not identifying the URI correctly.
1 parent 0ab2706 commit 5cd3ed7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mcp/tool/input_schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def validate_schema!
5050
accept_uri: false,
5151
accept_file: ->(path) { path.to_s.start_with?(Gem.loaded_specs["json-schema"].full_gem_path) },
5252
)
53-
metaschema = JSON::Validator.validator_for_name("draft4").metaschema
53+
metaschema = "file://#{JSON::Validator.validator_for_name("draft4").metaschema}"
5454
errors = JSON::Validator.fully_validate(metaschema, schema, schema_reader: schema_reader)
5555
if errors.any?
5656
raise ArgumentError, "Invalid JSON Schema: #{errors.join(", ")}"

0 commit comments

Comments
 (0)