research
AI-powered research tool for gathering technical information, best practices, and implementation guidance on any development topic.
Overview
The research tool leverages Gemini AI to conduct in-depth research on technical topics, providing comprehensive insights, best practices, and actionable recommendations. It's designed to help developers quickly understand new technologies, patterns, and implementation strategies.
Usage
await mcp__orchestre__research({
topic: string, // The topic to research
context?: string, // Additional context about your project
depth?: 'quick' | 'detailed' | 'comprehensive' // Research depth level
})Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| topic | string | Yes | - | The technical topic to research |
| context | string | No | "" | Project-specific context to tailor the research |
| depth | string | No | "detailed" | Research depth: quick (overview), detailed (standard), comprehensive (exhaustive) |
Return Value
Returns a structured research report:
interface ResearchResult {
topic: string
summary: string
keyFindings: string[]
bestPractices: string[]
implementation: {
overview: string
steps: string[]
codeExamples?: string[]
}
tools: string[]
resources: string[]
tradeoffs: {
pros: string[]
cons: string[]
}
recommendations: string[]
alternatives?: string[]
metadata: {
depth: string
timestamp: string
context: string
}
}Examples
Basic Research
const result = await mcp__orchestre__research({
topic: "WebSocket implementation in Next.js"
})Context-Aware Research
const result = await mcp__orchestre__research({
topic: "Authentication strategies",
context: "Building a B2B SaaS with MakerKit, need enterprise SSO",
depth: "comprehensive"
})Quick Overview
const result = await mcp__orchestre__research({
topic: "React Server Components",
depth: "quick"
})Research Depth Levels
Quick (5-10 seconds)
- High-level overview
- Key concepts
- Basic implementation steps
- Primary resources
Detailed (10-20 seconds)
- Comprehensive analysis
- Best practices
- Implementation guide
- Code examples
- Tool recommendations
- Tradeoffs analysis
Comprehensive (20-30 seconds)
- Exhaustive coverage
- Multiple implementation approaches
- Detailed code examples
- Performance considerations
- Security implications
- Alternative solutions
- Edge cases and gotchas
Example Output
{
"topic": "Implementing real-time features with WebSockets in Next.js",
"summary": "WebSocket implementation in Next.js requires careful consideration of the framework's serverless nature. Key approaches include using Socket.io with a custom server, leveraging third-party services like Pusher/Ably, or implementing Edge Runtime compatible solutions.",
"keyFindings": [
"Next.js doesn't natively support WebSockets in serverless deployments",
"Custom server setup required for self-hosted WebSocket solutions",
"Third-party services offer easier integration with better scalability",
"Edge Runtime provides WebSocket support through Cloudflare Durable Objects"
],
"bestPractices": [
"Use environment-appropriate solutions (custom server for self-hosted, services for serverless)",
"Implement proper authentication and authorization for WebSocket connections",
"Handle reconnection logic and connection state management",
"Use connection pooling and implement rate limiting",
"Separate WebSocket server from Next.js API routes for better scaling"
],
"implementation": {
"overview": "Implementation varies based on deployment target. For Vercel deployment, use third-party services. For self-hosted, implement custom server with Socket.io.",
"steps": [
"1. Choose implementation approach based on deployment target",
"2. Set up WebSocket server or integrate third-party service",
"3. Create client-side connection management with React hooks",
"4. Implement authentication flow for WebSocket connections",
"5. Handle connection lifecycle events",
"6. Add error handling and reconnection logic"
],
"codeExamples": [
"// Custom useWebSocket hook\nconst useWebSocket = (url) => {\n const [socket, setSocket] = useState(null);\n // Implementation details...\n}"
]
},
"tools": [
"Socket.io - Full-featured WebSocket library",
"Pusher - Managed WebSocket service",
"Ably - Real-time messaging platform",
"PartyKit - Edge-native WebSocket platform",
"Supabase Realtime - Postgres-based real-time subscriptions"
],
"resources": [
"https://socket.io/docs/v4/",
"https://nextjs.org/docs/deployment/self-hosting",
"https://vercel.com/guides/websockets",
"https://pusher.com/docs/channels/getting_started/javascript"
],
"tradeoffs": {
"pros": [
"Real-time bidirectional communication",
"Lower latency than polling",
"Efficient for frequent updates",
"Native browser support"
],
"cons": [
"Complex deployment in serverless environments",
"Requires stateful connections",
"Additional infrastructure needed",
"More complex error handling"
]
},
"recommendations": [
"For Vercel/serverless: Use Pusher, Ably, or PartyKit",
"For self-hosted: Implement Socket.io with custom server",
"For simple use cases: Consider Server-Sent Events (SSE) instead",
"Always implement fallback to HTTP polling for compatibility"
],
"alternatives": [
"Server-Sent Events (SSE) for one-way communication",
"Long polling for simpler implementation",
"WebRTC for peer-to-peer connections",
"GraphQL subscriptions for API-integrated real-time data"
],
"metadata": {
"depth": "detailed",
"timestamp": "2024-01-15T10:30:00Z",
"context": "Next.js application deployment considerations"
}
}Use Cases
Technology Evaluation
Research new technologies before adoption:
await research({
topic: "Comparing Prisma vs Drizzle for Next.js",
context: "High-traffic SaaS application with complex queries"
})Implementation Guidance
Get detailed implementation steps:
await research({
topic: "Implementing RBAC in a multi-tenant SaaS",
depth: "comprehensive"
})Best Practices Discovery
Learn current best practices:
await research({
topic: "React performance optimization techniques 2024"
})Problem Solving
Research solutions to specific problems:
await research({
topic: "Handling file uploads larger than 4.5MB in Vercel",
context: "Next.js app with user document uploads"
})Integration with Other Tools
With analyze_project
Use research to understand requirements better:
// Research authentication approaches
const authResearch = await research({
topic: "Modern authentication patterns for SaaS"
})
// Then analyze with informed context
const analysis = await analyze_project({
requirements: "Implement secure authentication",
context: { insights: authResearch.recommendations }
})With generate_plan
Research before planning:
// Research deployment strategies
const deployResearch = await research({
topic: "Next.js deployment strategies",
context: "Need global CDN and edge computing"
})
// Generate plan with research insights
const plan = await generate_plan({
requirements: requirements,
analysis: { ...analysis, deploymentInsights: deployResearch }
})Best Practices
Effective Topics
✅ Good research topics:
- "Implementing WebAuthn in Next.js applications"
- "Database connection pooling strategies for serverless"
- "Optimizing Core Web Vitals in React applications"
- "Multi-tenant architecture patterns for SaaS"
❌ Less effective topics:
- "JavaScript" (too broad)
- "Fix bug" (too vague)
- "Best programming language" (too subjective)
Context Optimization
Provide specific context for better results:
// Minimal context
{ topic: "caching" }
// Optimal context
{
topic: "Implementing Redis caching for Next.js API routes",
context: "E-commerce site with 100k daily users, product catalog with 50k items",
depth: "detailed"
}Depth Selection
Choose depth based on your needs:
- Quick: When you need a refresher or overview
- Detailed: For implementation planning (default)
- Comprehensive: For critical architectural decisions
Advanced Features
Fallback Mechanism
If AI research fails, the tool provides structured fallback responses with:
- General best practices
- Common implementation patterns
- Standard resource links
- Basic recommendations
Caching
Research results are cached in memory during the session to:
- Reduce API calls for repeated topics
- Improve response time
- Maintain consistency
Smart Context Integration
The tool intelligently incorporates context:
// Context influences all aspects of research
context: "Cloudflare Workers deployment"
// Results will focus on edge-compatible solutionsError Handling
The tool handles various error scenarios:
// API errors fallback to structured response
{
"topic": "Your topic",
"summary": "Fallback summary with general guidance...",
"keyFindings": ["General finding 1", "General finding 2"],
// ... structured fallback data
}
// Invalid parameters
{
"error": "Topic is required for research"
}Performance Considerations
API Usage
- Uses Gemini AI (requires GEMINI_API_KEY)
- Single API call per research request
- Implements retry logic for transient failures
- Falls back to local knowledge on API errors
Response Times
| Depth | Typical Duration | Token Usage |
|---|---|---|
| quick | 5-10 seconds | ~1k-2k tokens |
| detailed | 10-20 seconds | ~2k-4k tokens |
| comprehensive | 20-30 seconds | ~4k-6k tokens |
Tips for Effective Research
- Be Specific: "OAuth 2.0 implementation" > "authentication"
- Include Stack: "React Query with Next.js App Router" > "data fetching"
- Mention Constraints: "WebSockets for serverless deployment"
- State Goals: "Optimize for SEO" or "Maximize performance"
- Indicate Scale: "Enterprise-scale" or "MVP prototype"
Limitations
- Research quality depends on topic specificity
- May not have latest information (knowledge cutoff)
- Cannot access proprietary or closed-source documentation
- Best for general technical topics, not specific library APIs
Version History
- v5.2.0: Initial implementation of research tool
- AI-powered research with Gemini
- Three depth levels
- Structured fallback responses
- Context-aware recommendations
See Also
- analyze_project - Project requirements analysis
- generate_plan - Development planning
- /research - Research prompt interface
- Best Practices - General Orchestre patterns
