Expected Behavior
There is a way for me to react to @McpTool
methods throwing exceptions, e.g. to log them.
Current Behavior
There is no way to react to exceptions, they are turned into an MCP error response (great!) and then discard, losing all stacktrace and cause information (not great!).
Context
I'm trying to diagnose errors in an MCP tool and not having the errors logged makes it quite painful.
Comment From: rnett
Part of the reason for this is that only exceptions that are of the class returned by AbstractMcpToolProvider.doGetToolCallException
are turned into responses, but it returns java.lang.Exception
, so everything is.