Account for missing arguments

This commit is contained in:
calin 2025-07-23 15:17:23 +03:00
commit 47215c98ce

View file

@ -233,7 +233,7 @@ module MCP
raise RequestHandlerError.new("Tool not found #{tool_name}", request, error_type: :tool_not_found)
end
arguments = request[:arguments]
arguments = request[:arguments] || {}
add_instrumentation_data(tool_name:)
if tool.input_schema&.missing_required_arguments?(arguments)