-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
needs-feedbackPull requests that update Java codePull requests that update Java code
Description
Hi all,
When using Jakarta Validation on a tool method parameter, the response differs based on the presence of @WrapBusinessError.
Example:
@Tool
foo(FooRequest request)
class FooRequest {
@NotBlank
private String sessionId;
}
With @WrapBusinessError:
{
"content": [
{
"type": "text",
"text": "io.quarkiverse.mcp.server.McpException: chat.request.sessionId: must not be blank"
}
],
"isError": true
}
Without @WrapBusinessError:
{
"error": "MCP error -32602: chat.request.sessionId: must not be blank"
}
I've also included the (MCP Server - Hibernate Validator dependency.
Is this expected response?
Is the 2nd response viewed as a Protocol error and with @WrapBusinessError is a Tool error?
Kind regards
Bob
Metadata
Metadata
Assignees
Labels
needs-feedbackPull requests that update Java codePull requests that update Java code