Skip to content

[BUG] removeMcpServer deletes sibling servers' routes via prefix match #6887

Description

@Aias00

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions