MCP Tools Overview
Bob the Fixer exposes 21 MCP tools organized into 6 categories. This page provides a quick reference for all available tools.
Quick Reference
| Tool | Category | Description |
|---|---|---|
sonar_scan_project | Scanning | Scan project with SonarQube |
sonar_auto_setup | Scanning | Auto-configure SonarQube project |
sonar_get_issue_details | Analysis | Get detailed issue information |
sonar_analyze_patterns | Analysis | Group and analyze issue patterns |
sonar_get_security_hotspots | Analysis | List security hotspots |
sonar_get_security_hotspot_details | Analysis | Get hotspot details |
sonar_get_project_metrics | Metrics | Get project quality metrics |
sonar_get_quality_gate | Metrics | Check quality gate status |
sonar_get_technical_debt | Metrics | Analyze technical debt |
sonar_get_coverage_gaps | Metrics | Find uncovered code |
sonar_get_uncovered_files | Metrics | List files needing coverage |
sonar_get_duplication_summary | Duplication | Get duplication overview |
sonar_get_duplication_details | Duplication | Analyze file duplication |
sonar_generate_report | Reporting | Generate quality report |
sonar_project_discovery | Management | Discover project configuration |
sonar_config_manager | Management | Manage configuration |
sonar_link_existing_project | Management | Link existing project |
sonar_generate_config | Management | Generate sonar-project.properties |
sonar_cleanup | Management | Clean up old projects |
sonar_diagnose_permissions | Management | Diagnose connection issues |
sonar_delete_project | Management | Delete SonarQube project |
Tools by Category
Scanning (2 tools)
Tools for running SonarQube analysis on your projects.
| Tool | Purpose |
|---|---|
sonar_scan_project | Run full project analysis |
sonar_auto_setup | Configure and scan in one step |
Analysis (4 tools)
Tools for investigating issues and security problems.
| Tool | Purpose |
|---|---|
sonar_get_issue_details | Get issue with code context |
sonar_analyze_patterns | Group similar issues |
sonar_get_security_hotspots | List security concerns |
sonar_get_security_hotspot_details | Get security details |
Metrics (5 tools)
Tools for understanding project quality metrics.
| Tool | Purpose |
|---|---|
sonar_get_project_metrics | All quality metrics |
sonar_get_quality_gate | Pass/fail status |
sonar_get_technical_debt | Debt analysis with ROI |
sonar_get_coverage_gaps | Uncovered code blocks |
sonar_get_uncovered_files | Files needing coverage |
Duplication (2 tools)
Tools for finding and analyzing code duplication.
| Tool | Purpose |
|---|---|
sonar_get_duplication_summary | Files with most duplication |
sonar_get_duplication_details | Exact duplicate blocks |
Reporting (1 tool)
Tools for generating quality reports.
| Tool | Purpose |
|---|---|
sonar_generate_report | Summary, detailed, or JSON report |
Management (7 tools)
Tools for project configuration and maintenance.
| Tool | Purpose |
|---|---|
sonar_project_discovery | Detect languages/frameworks |
sonar_config_manager | View/validate/reset config |
sonar_link_existing_project | Link to existing project |
sonar_generate_config | Create properties file |
sonar_cleanup | Remove old projects |
sonar_diagnose_permissions | Debug connectivity |
sonar_delete_project | Delete project permanently |
Common Workflows
First-Time Scan
1. sonar_auto_setup (or sonar_scan_project with autoSetup: true)
2. sonar_get_issue_details for each issue
3. Fix issues
4. sonar_scan_project with autoSetup: false to verify
Security Review
1. sonar_scan_project
2. sonar_get_security_hotspots
3. sonar_get_security_hotspot_details for each
4. Review and fix
5. Re-scan to verify
Technical Debt Sprint
1. sonar_get_technical_debt with budget analysis
2. sonar_analyze_patterns grouped by fixability
3. Fix auto-fixable issues first
4. sonar_generate_report for documentation
Duplication Cleanup
1. sonar_get_duplication_summary sorted by lines
2. sonar_get_duplication_details for top files
3. Refactor duplicate code
4. Re-scan to measure improvement
Coverage Improvement
1. sonar_get_uncovered_files to identify targets
2. sonar_get_coverage_gaps for detailed analysis
3. Write tests for uncovered code
4. Re-scan to verify improvement
Parameter Types
Common parameter types across tools:
| Type | Format | Example |
|---|---|---|
string | Text | "/path/to/project" |
boolean | true/false | true |
number | Integer | 10 |
array | JSON array | ["BLOCKER", "CRITICAL"] |
Response Formats
All tools return formatted text responses optimized for AI assistants:
- Headers with clear sections
- Tables for structured data
- Code blocks for examples
- Icons for status (✓, ✗, ⚠️)
Error Handling
Common error responses:
| Error | Meaning | Solution |
|---|---|---|
| "Project not found" | No SonarQube project | Use autoSetup: true |
| "Authentication failed" | Invalid token | Check SONAR_TOKEN |
| "Permission denied" | Insufficient rights | Verify token permissions |
| "Connection refused" | Server unreachable | Check SONAR_URL |
Next Steps
Explore each tool category: