mcp__gemini__thinkdeep_enhanced
Analyze complex problems with enhanced AI reasoning, validate logical steps, ensure consistency, and track progress for accurate solutions across specialized domains.
Instructions
Extended AI reasoning with step validation, logical consistency checking, and progress tracking
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | Problem domain for specialized reasoning | |
| problem | Yes | Complex problem to analyze | |
| thinking_depth | No | Depth level | deep |
| validate_steps | No | Enable step validation |
Implementation Reference
- src/tools/enhanced-tools.js:96-184 (handler)The core handler function implementing the enhanced deep thinking tool. It constructs a detailed multi-step reasoning prompt based on input parameters (problem, depth, validation, domain), calls the AI analysis model, optionally performs a validation review, formats the output with emojis and sections, and includes performance monitoring.handler: async (args) => { const { problem, thinking_depth = 'deep', validate_steps = true, domain = 'general' } = args; validateString(problem, 'problem'); const timer = performanceMonitor.startTimer('thinkdeep_enhanced'); const depthLevels = { shallow: 3, medium: 5, deep: 7, profound: 10 }; const steps = depthLevels[thinking_depth] || 7; let prompt = `As an expert in ${domain}, think deeply about this problem through ${steps} progressive steps: Problem: ${problem} Approach this systematically: 1. Problem decomposition and understanding 2. Context analysis and assumptions 3. Multiple solution approaches 4. Logical reasoning and validation 5. Potential obstacles and mitigations`; if (steps > 5) { prompt += ` 6. Alternative perspectives and counterarguments 7. Synthesis and final reasoning`; } if (steps > 7) { prompt += ` 8. Edge cases and boundary conditions 9. Implementation considerations 10. Long-term implications and consequences`; } prompt += ` For each step, provide: - Clear reasoning - Supporting evidence or logic - Potential weaknesses or gaps - Connection to previous steps ${validate_steps ? 'IMPORTANT: Validate each step before proceeding to the next.' : ''} End with a comprehensive synthesis of your deep thinking process.`; const analysis = await aiClient.call(prompt, 'analysis', { complexity: 'complex', maxTokens: 4000 }); let result = `🧠 **Enhanced Deep Thinking** (${thinking_depth} - ${steps} steps) **Domain**: ${domain} **Validation**: ${validate_steps ? 'Enabled' : 'Disabled'} ${analysis}`; // If validation is enabled, run a consistency check if (validate_steps) { const validationPrompt = `Review this deep thinking analysis for logical consistency, gaps, and potential improvements: ${analysis} Provide: 1. Logical consistency assessment (1-10 scale) 2. Identified gaps or weaknesses 3. Suggestions for improvement 4. Overall quality score`; const validation = await aiClient.call(validationPrompt, 'review'); result += ` --- 🔍 **Validation Report** ${validation}`; } timer.end(); return result; }
- src/tools/enhanced-tools.js:90-95 (schema)The input schema defining parameters for the tool: problem (required string), thinking_depth (string default 'deep'), validate_steps (boolean default true), domain (string). Used by the registry to generate JSON schema.parameters: { problem: { type: 'string', description: 'Complex problem to analyze', required: true }, thinking_depth: { type: 'string', description: 'Depth level', default: 'deep' }, validate_steps: { type: 'boolean', description: 'Enable step validation', default: true }, domain: { type: 'string', description: 'Problem domain for specialized reasoning' } },
- src/tools/registry.js:244-248 (registration)The registerToolsFromModule method that iterates over the enhancedTools object (imported at line 7) and registers each tool including 'mcp__gemini__thinkdeep_enhanced' via registerTool. Called at line 237 for enhancedTools.registerToolsFromModule(toolsModule) { Object.entries(toolsModule).forEach(([name, tool]) => { this.registerTool(name, tool.description, tool.parameters, tool.handler); }); }
- src/tools/registry.js:237-237 (registration)Specific call that registers the enhancedTools module, including the target tool.this.registerToolsFromModule(enhancedTools);