zrald3
Version:
Sequential Thinking MCP Server - Advanced reasoning and analysis using data from zrald1 and zrald2 for comprehensive code intelligence
284 lines (228 loc) • 6.7 kB
Markdown
Advanced sequential thinking and reasoning MCP server that integrates data from both **zrald1** (file analysis) and **zrald2** (function logic) to perform comprehensive code intelligence analysis.
zrald3 is the third server in the zrald trilogy, designed to perform sophisticated reasoning and analysis by combining insights from:
- **zrald1**: File structure, relationships, and graph data
- **zrald2**: Function analysis, logic patterns, and complexity metrics
The server uses sequential thinking methodology to break down complex problems into manageable steps, providing evidence-based insights and actionable recommendations.
**REQUIRED**: Both zrald1 and zrald2 must be running before using zrald3.
```bash
npx -y zrald1
npx -y zrald2
npx -y zrald3
```
```bash
npm install -g zrald3
```
```bash
npx -y zrald3
```
Perform comprehensive sequential thinking analysis using integrated data.
**Parameters:**
- `user_query` (required): The question or problem to analyze
- `thinking_depth`: 'shallow' | 'medium' | 'deep' (default: 'medium')
- `focus_areas`: Array of specific areas to focus on
- `max_steps`: Maximum thinking steps (default: 10)
- `include_evidence`: Include detailed evidence (default: true)
**Example:**
```json
{
"user_query": "Analyze the codebase for security vulnerabilities and performance issues",
"thinking_depth": "deep",
"focus_areas": ["security", "performance", "complexity"],
"max_steps": 15,
"include_evidence": true
}
```
Check if both zrald1 and zrald2 are available and accessible.
**Example:**
```json
{}
```
Get a formatted summary of the latest thinking session.
**Parameters:**
- `format`: 'brief' | 'detailed' | 'technical' (default: 'detailed')
Analyze a specific context using integrated data.
**Parameters:**
- `context` (required): The specific context to analyze
- `intent`: 'analyze' | 'debug' | 'optimize' | 'understand' | 'design' | 'solve'
- `complexity`: 'low' | 'medium' | 'high'
Get insights from the latest thinking session with optional filtering.
**Parameters:**
- `priority_filter`: 'all' | 'high' | 'critical' (default: 'all')
- `thinking://latest` - Latest thinking session data
- `insights://latest` - Latest insights from analysis
- `recommendations://latest` - Latest recommendations
zrald3 follows a structured thinking methodology:
1. **Initial Analysis** - Gather and assess data from zrald1 and zrald2
2. **Data Correlation** - Find relationships between file structure and function logic
3. **Pattern Analysis** - Examine logic patterns and architectural insights
4. **Insight Synthesis** - Generate actionable insights from findings
5. **Recommendation Generation** - Formulate specific recommendations
Each step includes:
- Evidence collection from both servers
- Confidence scoring
- Reasoning documentation
- Progressive refinement
```json
{
"user_query": "Evaluate overall code quality and identify improvement areas",
"thinking_depth": "deep",
"focus_areas": ["complexity", "maintainability", "patterns"]
}
```
```json
{
"user_query": "Analyze the codebase for potential security vulnerabilities",
"thinking_depth": "deep",
"focus_areas": ["security", "input-validation", "error-handling"]
}
```
```json
{
"user_query": "Find performance bottlenecks and optimization opportunities",
"thinking_depth": "medium",
"focus_areas": ["performance", "complexity", "algorithms"]
}
```
```json
{
"user_query": "Review the current architecture and suggest improvements",
"thinking_depth": "deep",
"focus_areas": ["architecture", "relationships", "modularity"]
}
```
```json
{
"mcpServers": {
"zrald1": {
"command": "npx",
"args": ["-y", "zrald1"]
},
"zrald2": {
"command": "npx",
"args": ["-y", "zrald2"]
},
"zrald3": {
"command": "npx",
"args": ["-y", "zrald3"]
}
}
}
```
```json
{
"success": true,
"thinking_result": {
"session": {
"id": "session-uuid",
"steps": [...],
"confidence": 0.85,
"conclusion": "Analysis summary"
},
"insights": [...],
"recommendations": [...],
"nextSteps": [...]
},
"dependencies_used": {
"zrald1_files": 5,
"zrald2_functions": 12,
"correlations": 3,
"insights": 4
}
}
```
```json
{
"id": "insight-uuid",
"type": "risk" | "opportunity" | "pattern" | "anomaly",
"description": "Insight description",
"priority": "low" | "medium" | "high" | "critical",
"confidence": 0.9,
"evidence": [...],
"actionable": true
}
```
```json
{
"id": "rec-uuid",
"type": "improvement" | "fix" | "optimization" | "investigation",
"description": "Recommendation description",
"priority": "low" | "medium" | "high" | "critical",
"effort": "low" | "medium" | "high",
"impact": "low" | "medium" | "high",
"rationale": "Why this recommendation is important"
}
```
1. **Start Dependencies**
```bash
npx -y zrald1
npx -y zrald2
```
2. **Start zrald3**
```bash
npx -y zrald3
```
3. **Validate Setup**
```json
{
"tool": "validate_dependencies"
}
```
4. **Perform Analysis**
```json
{
"tool": "sequential_thinking",
"arguments": {
"user_query": "Your analysis question"
}
}
```
If dependencies are missing:
```json
{
"success": false,
"error": "zrald1 MCP server is required but not accessible. Please start zrald1 first: npx -y zrald1",
"requirement": "zrald1_required",
"dependencies_status": {
"zrald1": false,
"zrald2": true
}
}
```
MIT License - see LICENSE file for details.
This is part of the zrald MCP server trilogy. Contributions welcome!
- **zrald1**: File analysis and graph processing MCP server
- **zrald2**: Function logic analysis MCP server
- **zrald3**: Sequential thinking and reasoning MCP server (this project)