Decorator to apply interceptors to MCP tools, resources, or prompts Interceptors wrap handler execution for cross-cutting concerns like logging, transformation, error handling, and performance monitoring
Interceptor classes to apply
@Injectable()class MyToolProvider { @UseMCPInterceptors(LoggingInterceptor, TimeoutInterceptor) @MCPTool({ name: 'monitored_tool', description: 'A tool with logging and timeout' }) async monitoredTool() { return 'Result'; }} Copy
@Injectable()class MyToolProvider { @UseMCPInterceptors(LoggingInterceptor, TimeoutInterceptor) @MCPTool({ name: 'monitored_tool', description: 'A tool with logging and timeout' }) async monitoredTool() { return 'Result'; }}
Decorator to apply interceptors to MCP tools, resources, or prompts Interceptors wrap handler execution for cross-cutting concerns like logging, transformation, error handling, and performance monitoring