review
Analyze code for security vulnerabilities, performance issues, and quality standards. Get automated scoring and improvement recommendations across multiple files.
Instructions
👀 Comprehensive code review - Security audit, performance analysis, best practices validation. Multi-file correlation analysis. Automated quality scoring and improvement suggestions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Code content to review | |
| file_path | No | File path for context | |
| language | No | Programming language hint | |
| review_type | No | comprehensive |
Implementation Reference
- smart-ai-bridge-v1.1.0.js:921-956 (handler)The handler function that executes the 'review' tool logic. It processes arguments like content and file_path, performs a placeholder analysis, records usage analytics, and returns a structured result.async handleReview(args) { const { content, file_path, language, review_type = 'comprehensive' } = args; // Record analytics const startTime = Date.now(); try { // Placeholder implementation - full implementation would use router const result = { success: true, file_path, language, review_type, analysis: 'Code review placeholder', timestamp: new Date().toISOString() }; await this.usageAnalytics.recordInvocation({ tool_name: 'review', backend_used: 'local', processing_time_ms: Date.now() - startTime, success: true }); return result; } catch (error) { await this.usageAnalytics.recordInvocation({ tool_name: 'review', backend_used: 'local', processing_time_ms: Date.now() - startTime, success: false, error }); throw error; } }
- smart-ai-bridge-v1.1.0.js:232-245 (schema)Input schema definition for the 'review' tool, specifying properties and validation rules.schema: { type: 'object', properties: { content: { type: 'string', description: 'Code content to review' }, file_path: { type: 'string', description: 'File path for context' }, language: { type: 'string', description: 'Programming language hint' }, review_type: { type: 'string', enum: ['security', 'performance', 'quality', 'comprehensive'], default: 'comprehensive' } }, required: ['content'] }
- smart-ai-bridge-v1.1.0.js:229-246 (registration)Core tool definition object for 'review', including name, description, handler reference, and schema. This is added to coreTools map for registration.name: 'review', description: '👀 Comprehensive code review - Security audit, performance analysis, best practices validation. Multi-file correlation analysis. Automated quality scoring and improvement suggestions.', handler: 'handleReview', schema: { type: 'object', properties: { content: { type: 'string', description: 'Code content to review' }, file_path: { type: 'string', description: 'File path for context' }, language: { type: 'string', description: 'Programming language hint' }, review_type: { type: 'string', enum: ['security', 'performance', 'quality', 'comprehensive'], default: 'comprehensive' } }, required: ['content'] } },
- smart-ai-bridge-v1.1.0.js:583-596 (registration)Alias definitions that map alternative names (MKG_*, deepseek_*) to the core 'review' tool, enabling backwards compatibility and multiple entry points.// MKG aliases { alias: 'MKG_analyze', coreTool: 'review' }, { alias: 'MKG_generate', coreTool: 'ask' }, { alias: 'MKG_review', coreTool: 'review' }, { alias: 'MKG_edit', coreTool: 'edit_file' }, { alias: 'MKG_health', coreTool: 'health' }, // DeepSeek aliases { alias: 'deepseek_analyze', coreTool: 'review' }, { alias: 'deepseek_generate', coreTool: 'ask' }, { alias: 'deepseek_review', coreTool: 'review' }, { alias: 'deepseek_edit', coreTool: 'edit_file' }, { alias: 'deepseek_health', coreTool: 'health' } ];