Logging interceptor - logs before and after handler execution Includes timing information and error logging
@Injectable()class MyToolProvider { @UseMCPInterceptors(LoggingInterceptor) @MCPTool({ name: 'my_tool', description: 'Logged tool' }) async myTool() { return 'Result'; }} Copy
@Injectable()class MyToolProvider { @UseMCPInterceptors(LoggingInterceptor) @MCPTool({ name: 'my_tool', description: 'Logged tool' }) async myTool() { return 'Result'; }}
Intercept the handler execution
Execution context
Call handler function
The result or a transformed result
Logging interceptor - logs before and after handler execution Includes timing information and error logging
Example