Loading
List unknown and accepted parameter names in MCP validation errors
What does this merge request do and why?
When Mcp::Tools::Base::BaseService#validate_arguments! rejects an undeclared top-level parameter via additionalProperties: false:
- Report the parameter as
Unknown parameter '<field>'. Accepted parameters: <properties>instead of<field> is invalid, so agents can immediately see the valid parameter names without guessing or re-reading the schema. - Report all missing required keys (
error['details']['missing_keys']) instead of only.first.
References
Closes #635931
How to set up and validate locally
- Run the base service and tool call specs:
bundle exec rspec spec/services/mcp/tools/base/base_service_spec.rb spec/requests/api/mcp/handlers/call_tool_spec.rb