Description
createParameterSchema and recursionConstructPropertiesNodes set only type/description/properties/items. The required array is never written, and McpServerToolParameter.required/defaultValue fields are ignored. Per JSON Schema / MCP, required parameters must be listed in a top-level required array.
Location
shenyu-plugin/shenyu-plugin-mcp-server/src/main/java/org/apache/shenyu/plugin/mcp/server/utils/JsonSchemaUtil.java:49-67
Impact
MCP clients treat every parameter as optional and won't enforce/validate the tool's real contract; tools silently accept calls missing required arguments.
Suggested fix
Collect parameters where parameter.isRequired() is true into a required ArrayNode on the schema root.
Related existing
None.
Description
createParameterSchemaandrecursionConstructPropertiesNodesset onlytype/description/properties/items. Therequiredarray is never written, andMcpServerToolParameter.required/defaultValuefields are ignored. Per JSON Schema / MCP, required parameters must be listed in a top-levelrequiredarray.Location
shenyu-plugin/shenyu-plugin-mcp-server/src/main/java/org/apache/shenyu/plugin/mcp/server/utils/JsonSchemaUtil.java:49-67Impact
MCP clients treat every parameter as optional and won't enforce/validate the tool's real contract; tools silently accept calls missing required arguments.
Suggested fix
Collect parameters where
parameter.isRequired()is true into arequiredArrayNode on the schema root.Related existing
None.