Prerequisites: First set up the MCP server in your IDE, then follow the workflows below.
Overview
Once you have set up the Greptile MCP server in your IDE, you will be able to:- Retrieve unaddressed review comments
- Search for specific types of issues
- Get context about why issues were flagged
- Apply fixes based on Greptile’s suggestions
Retrieving Comments
Get Comments for Current PR
Ask for Comments
Use these proven prompts with Claude:
- “Show me all unaddressed Greptile comments for this PR”
- “What security issues has Greptile found recently?”
- “Search for Greptile comments about error handling”
Search for Specific Issues
Find Comments by Type:- “Find all security-related Greptile comments in this repository”
- “Show me performance issues flagged by Greptile”
- “Get error handling comments from recent reviews”
- “Show Greptile comments for the current file”
- “Are there any unaddressed reviews for src/auth.js?”
- “What issues has Greptile found in this component?”
Resolving Comments Step-by-Step
Automated Resolution
Select Comment to Fix
In your IDE, click on a Greptile comment or use:
“Fix this Greptile comment: [paste comment text]”
Analyze the Issue
The IDE will:
- Read the comment and understand the problem
- Examine the code context
- Check related custom context patterns
- Determine the appropriate fix strategy
Generate Fix
The coding agent will:
- Propose a specific code change
- Explain why this fix addresses the issue
- Show before/after code comparison
Apply Fix
Review and apply the suggested changes:
- “Apply this fix”
- “Show me the diff first”
- “Explain why this fixes the issue”
Manual Resolution with AI Guidance
Get Detailed Explanation:- “Explain this Greptile comment in detail and suggest how to fix it”
- “Why is this flagged as a security issue?”
- “What’s the best way to resolve this performance concern?”
- “How should I fix this memory leak issue?”
- “Suggest 2-3 ways to address this code duplication”
- “What’s the proper error handling pattern here?”
Practical Examples
Security Issue Resolution
Greptile Comment:“Consider adding input validation to prevent potential security vulnerabilities. The user input should be sanitized before processing.”In Claude Code:
Performance Issue Resolution
Greptile Comment:“N+1 query problem detected - consider using joins or batch loading”In Cursor:
Code Style Violation
Greptile Comment:“Use camelCase for variable names according to team guidelines”Resolution Workflow:
Advanced Workflows
The following sections cover advanced automation. For basic comment resolution, the steps above are sufficient.
Batch Comment Resolution
Resolve Multiple Comments:Context-Aware Fixes
Using Custom Context:Integration with Development Workflow
Pre-commit Resolution:Best Practices
Quick Reference: When to Use Auto-Fix vs Manual Review
Quick Reference: When to Use Auto-Fix vs Manual Review
When to Use Auto-Fix
Safe for Auto-Fix:- Code style and formatting issues
- Simple null checks and validation
- Naming convention corrections
- Basic error handling additions
- Architecture and design changes
- Complex logic modifications
- Performance optimizations with tradeoffs
- Security fixes affecting business logic
Verification Steps
- Code Review: Always review auto-generated fixes before applying them to ensure they make sense in context
- Test execution: Run relevant tests after applying fixes to catch any regressions
- Review integration: Mark comments as addressed only after verification
- Rollback capability: Provide undo functionality for problematic fixes
Human Oversight
- Confidence scoring: Only auto-apply high-confidence fixes
- Review queuing: Queue uncertain fixes for human review
- Explanation logging: Document what changes were made and why
- Approval workflows: Require human approval for critical file changes