quick_scan
Scan log content to detect errors and identify issues for real-time monitoring and debugging.
Instructions
⚡ Ultra-fast log scan for real-time monitoring (< 1 second)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| logText | Yes | Log content for quick error detection |
Implementation Reference
- src/server.ts:324-344 (handler)MCP tool handler for 'quick_scan' that validates input, calls rapidDebugger.quickScan, and formats the MCPToolResult response.private async handleQuickScan(args: any): Promise<MCPToolResult> { const { logText } = args; if (!logText || typeof logText !== 'string') { throw new Error('logText is required and must be a string'); } const scanResult = await this.rapidDebugger.quickScan(logText); return { success: true, data: { ...scanResult, message: `⚡ Quick scan completed in ${scanResult.time}ms` }, metadata: { processedAt: new Date(), scanMode: 'quick' } }; }
- src/server.ts:67-76 (schema)Input schema definition for the 'quick_scan' tool, specifying logText as required string.inputSchema: { type: 'object', properties: { logText: { type: 'string', description: 'Log content for quick error detection' } }, required: ['logText'] }
- src/server.ts:64-77 (registration)Registration of the 'quick_scan' tool in the ListToolsRequestHandler response.{ name: 'quick_scan', description: '⚡ Ultra-fast log scan for real-time monitoring (< 1 second)', inputSchema: { type: 'object', properties: { logText: { type: 'string', description: 'Log content for quick error detection' } }, required: ['logText'] } },
- src/tools/rapidDebugger.ts:227-239 (helper)Core implementation of quickScan logic: counts errors, detects critical issues, measures execution time.async quickScan(logContent: string): Promise<{errors: number, critical: boolean, time: number}> { const start = Date.now(); const errors = LogUtils.extractErrorPatterns(logContent); const critical = logContent.toLowerCase().includes('fatal') || logContent.toLowerCase().includes('critical') || errors.length > 5; return { errors: errors.length, critical, time: Date.now() - start }; }
- src/server.ts:177-179 (registration)Dispatch registration in the CallToolRequestHandler switch statement.case 'quick_scan': result = await this.handleQuickScan(args); break;