feat: Add review tool for code review functionality#6
Open
Lies188 wants to merge 1 commit intocexll:mainfrom
Open
feat: Add review tool for code review functionality#6Lies188 wants to merge 1 commit intocexll:mainfrom
Lies188 wants to merge 1 commit intocexll:mainfrom
Conversation
This PR adds a new `review` tool to the Codex MCP server that enables
automated code review using the Codex CLI's `codex review` command.
## Changes
### New Files
- `src/tools/review-codex.tool.ts`: New review tool implementation
### Modified Files
- `src/tools/index.ts`: Register the review tool in the tool registry
- `src/utils/commandExecutor.ts`: Add `cwd` parameter support for
executing commands in specific working directories
## Features
The review tool supports:
- `--uncommitted`: Review staged, unstaged, and untracked changes
- `--commit <SHA>`: Review changes from a specific commit
- `--base <branch>`: Review changes against a base branch
- `--title`: Optional commit title for review summary
- `--prompt`: Custom review instructions
- `-c/--config`: Configuration overrides
- `--enable/--disable`: Feature flag controls
- `workingDir`: Specify the git repository directory
- `timeout`: Custom execution timeout
- `debug`: Return raw output for troubleshooting
## Usage Examples
```json
{ "uncommitted": true, "workingDir": "/path/to/repo" }
{ "commit": "abc1234", "workingDir": "/path/to/repo" }
{ "base": "main", "workingDir": "/path/to/repo" }
```
via [HAPI](https://hapi.run)
Co-Authored-By: HAPI <noreply@hapi.run>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new
reviewtool to the Codex MCP server that enables automated code review using the Codex CLI'scodex reviewcommand.Changes
New Files
src/tools/review-codex.tool.ts: New review tool implementationModified Files
src/tools/index.ts: Register the review tool in the tool registrysrc/utils/commandExecutor.ts: Addcwdparameter support for executing commands in specific working directoriesFeatures
The review tool supports all
codex reviewCLI options:uncommittedcommitbasetitlepromptconfigenableFeaturesdisableFeaturesworkingDirtimeoutdebugUsage Examples
Testing
Tested with:
--commitscenario--uncommittedscenario--basescenariovia HAPI