We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16ee7d2 commit b2cddeeCopy full SHA for b2cddee
includes/Core/RegisterMcpTool.php
@@ -108,8 +108,10 @@ private function get_args_from_rest_api(): void {
108
109
// Handle enums if present.
110
if ( isset( $arg_schema['enum'] ) ) {
111
- $input_schema['properties'][ $arg_name ]['enum'] = $arg_schema['enum'];
112
- }
+ // Ensure enum values are unique
+ $unique_enum = array_values(array_unique($arg_schema['enum'], SORT_REGULAR));
113
+ $input_schema['properties'][ ]['enum'] = $unique_enum;
114
+ }
115
116
// Handle default values if present.
117
if ( isset( $arg_schema['default'] ) && ! empty( $arg_schema['default'] ) ) {
0 commit comments