Summary
Evaluate and adopt the optional data field added to McpException/McpError in 2.0 for structured error details.
Currently @WrapBusinessError wraps exceptions as plain text messages. Structured error data (resource name, namespace, error category) could help LLM clients handle
errors more intelligently.
Scope
- Check if
ToolCallException constructor supports a data field
- Identify key error paths that would benefit from structured context
- Update error handling in tool classes if beneficial
Acceptance criteria
Summary
Evaluate and adopt the optional
datafield added toMcpException/McpErrorin 2.0 for structured error details.Currently
@WrapBusinessErrorwraps exceptions as plain text messages. Structured error data (resource name, namespace, error category) could help LLM clients handleerrors more intelligently.
Scope
ToolCallExceptionconstructor supports adatafieldAcceptance criteria