Second Opinion Tools
Second Opinion tools provide AI challenger feedback from alternative models to help agents validate approaches, find blind spots, and research best practices.
Why Second Opinion?
When working on complex problems, AI agents can get stuck in local optima or miss obvious issues. The Second Opinion tools provide:
- Challenge mode - Find flaws and edge cases in proposed solutions
- Alternative mode - Suggest different approaches you might not have considered
- Validate mode - Assess if a solution will actually work
- Research mode - Find documentation, GitHub issues, and best practices
When to Use
Use Second Opinion when:
- You've failed the same task 3+ times
- You're not sure if your approach is correct
- Making critical infrastructure changes
- You want to research best practices before implementing
- A solution "feels wrong" but you can't articulate why
Architecture
┌─────────────────┐ ┌─────────────┐ ┌────────────────┐
│ MCPammer │────▶│ Artemis │────▶│ OpenRouter / │
│ (MCP Tools) │ │ Gateway │ │ Perplexity │
└─────────────────┘ └─────────────┘ └────────────────┘
│ │
│ ├─ Usage tracking via X-App-Id
│ └─ Unified API key management
│
└─ File reading with security checks
Second Opinion routes through Artemis LLM Gateway (not direct API calls) for:
- Unified API key management
- Per-app usage tracking via
X-App-Id: mcpammerheader - Cost monitoring and rate limiting
Tools
mcpammer_second_opinion
Main tool for getting AI challenger feedback.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
context | string | Yes | Problem description - what are you trying to solve? |
proposal | string | Yes | Your proposed solution |
file_paths | string[] | No | Paths to code files to review (read server-side) |
failures | string[] | No | List of previous failed attempts |
mode | string | No | challenge, alternative, validate, or research (default: challenge) |
model | string | No | Model ID (default: anthropic/claude-3.5-sonnet) |
Example:
{
"context": "Need to add caching to the API to reduce database load",
"proposal": "Add Redis caching with 5 minute TTL on all GET endpoints",
"file_paths": ["/home/user/project/src/api/routes.py"],
"mode": "challenge"
}
Response includes:
- Identified issues or concerns
- Specific recommendations
- Confidence assessment
- Alternative approaches (if applicable)
mcpammer_second_opinion_dialogue
Multi-round Socratic dialogue for thorough vetting of critical decisions.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
context | string | Yes | Problem description |
proposal | string | Yes | Proposed solution |
failures | string[] | No | Previous failed attempts |
max_rounds | integer | No | Maximum dialogue rounds (default: 3) |
challenger_model | string | No | Model for challenger (default: anthropic/claude-3.5-sonnet) |
Dialogue rounds:
- Challenge round - Find flaws and edge cases
- Research round - Verify against documentation
- Validation round - Final recommendation
mcpammer_second_opinion_quick
Quick yes/no validation check. Use for fast sanity checks.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
context | string | Yes | Problem description |
proposal | string | Yes | Proposed solution |
Response:
{
"likely_to_work": true,
"confidence": "high",
"brief_reasoning": "Standard pattern, well-supported approach"
}
mcpammer_second_opinion_models
List recommended models for second opinions.
Response includes:
- Model ID and display name
- Strengths (coding, research, reasoning)
- Cost tier
- Recommended use cases
mcpammer_second_opinion_models_search
Search all available OpenRouter models.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
search | string | No | Search term (e.g., "gemini", "gpt-4") |
category | string | No | Filter by category |
Modes Explained
Challenge Mode
Actively tries to find problems with your solution.
Best for:
- Code review before commit
- Architecture decisions
- Security-sensitive changes
Prompt focus:
- Edge cases and failure scenarios
- Performance implications
- Security vulnerabilities
- Maintainability concerns
Alternative Mode
Suggests completely different approaches.
Best for:
- When you're stuck on one approach
- Exploring solution space
- Learning new patterns
Prompt focus:
- Different architectural patterns
- Trade-off analysis
- Industry best practices
Validate Mode
Assesses likelihood of success.
Best for:
- Final check before implementation
- Confidence calibration
- Go/no-go decisions
Prompt focus:
- Feasibility assessment
- Risk identification
- Success probability
Research Mode
Searches web for documentation and best practices. Uses Perplexity models with web search capability.
Best for:
- Finding official documentation
- Discovering known issues
- Learning from others' solutions
Prompt focus:
- Official docs and guides
- GitHub issues and discussions
- Stack Overflow solutions
- Blog posts and tutorials
File Reading Security
When you pass file_paths, the MCP server reads files locally with security checks:
| Check | Limit |
|---|---|
| Max file size | 500KB per file |
| Max files | 20 files per request |
| Blocked patterns | .env, credentials, secrets, .pem, .key, id_rsa, .git/config |
| Allowed directories | Home directory, CWD, /tmp |
Files are read server-side to save tokens in the main conversation context.
Available Models
Recommended for Second Opinion
| Model | Best For | Notes |
|---|---|---|
anthropic/claude-3.5-sonnet | Research, general | Web search enabled, default |
openai/gpt-4o | Code review | Strong reasoning |
anthropic/claude-3.5-sonnet | Architecture | Good at trade-offs |
google/gemini-pro-1.5 | Long context | 1M token context |
Perplexity Models (Research Mode)
| Model | Context | Notes |
|---|---|---|
llama-3.1-sonar-small-128k-online | 128K | Fast, economical |
llama-3.1-sonar-large-128k-online | 128K | Balanced |
llama-3.1-sonar-huge-128k-online | 128K | Most capable |
Usage Tracking
All Second Opinion calls are tracked via Artemis:
- X-App-Id:
mcpammer- Identifies source - Usage dashboard: https://artemis.jettaintelligence.com
- Metrics tracked: Requests, tokens, cost per app
Best Practices
Do
- Provide clear context about what you're trying to achieve
- Include relevant file paths for code-related questions
- List previous failures to avoid repeated suggestions
- Use
researchmode before implementing unfamiliar patterns - Use
dialoguemode for critical infrastructure changes
Don't
- Use for trivial decisions (adds latency and cost)
- Ignore the feedback (defeats the purpose)
- Pass sensitive files (credentials, secrets)
- Use as a replacement for testing
Case Studies
Real examples of Second Opinion in action:
- Self Review - The tool reviewing its own implementation
- Cronus Initiative - Pre-implementation review of a new project
- Sable MCP Initiative - Validating OAuth architecture before implementation
Related
- Artemis LLM Gateway - Underlying LLM proxy
- MCPammer Overview - All MCPammer tools
- Skillflows - Automated workflows