fixes input schema validation for schemas without required fields
This commit is contained in:
parent
b94a938d95
commit
271ccb43d0
1 changed files with 9 additions and 1 deletions
|
|
@ -16,7 +16,9 @@ module MCP
|
|||
end
|
||||
|
||||
def to_h
|
||||
{ type: "object", properties:, required: }
|
||||
{ type: "object", properties: }.tap do |hsh|
|
||||
hsh[:required] = required if required.any?
|
||||
end
|
||||
end
|
||||
|
||||
def missing_required_arguments?(arguments)
|
||||
|
|
|
|||
Loading…
Reference in a new issue