Skip to main content

codebolt.review

Code review operations tools for creating, managing, and processing merge request reviews.

Available Tools

  • review_create - Creates a new merge request review for code changes
  • review_get - Gets a single merge request review by its ID with full details
  • review_list - Lists merge request reviews with optional filtering and pagination
  • review_update - Updates an existing merge request review properties
  • review_submit - Submits a review, changing status from draft to pending_review
  • review_approve - Approves a merge request review with optional comment
  • review_request_changes - Requests changes on a merge request with required comment
  • review_add_comment - Adds a comment to a merge request review without approving or rejecting

Tool Parameters

review_create

Creates a new merge request review. Use this to submit code changes for review by other agents or users. Specify the type as 'review' for review only or 'review_merge' for review with merge capability.

ParameterTypeRequiredDescription
typestringYesType of request: 'review' for review only, 'review_merge' for review with merge capability.
initial_taskstringYesThe original task description that led to these changes.
titlestringYesA concise title for the review request.
descriptionstringYesDetailed description of the changes made.
major_files_changedarrayYesArray of main file paths that were changed.
diff_patchstringYesThe unified diff/patch content of the changes.
agent_idstringYesID of the agent creating this review request.
agent_namestringYesName of the agent creating this review request.
swarm_idstringNoOptional swarm ID if this is part of a swarm operation.
issues_facedarrayNoOptional array of issues encountered during implementation.
remaining_tasksarrayNoOptional array of tasks still to be completed.
merge_strategystringNoOptional merge strategy: 'patch' or 'git_worktree'.
changes_file_pathstringNoOptional path to a file containing changes summary.
task_descriptionstringNoOptional extended description of the task.

review_get

Gets a single merge request review by its ID. Returns the full review details including status, description, files changed, reviews received, and merge information.

ParameterTypeRequiredDescription
review_idstringYesThe unique identifier of the review to retrieve.

review_list

Lists merge request reviews with optional filtering. Can filter by status, type, agent, swarm, date ranges, and title. Supports pagination with limit and offset, and sorting by various fields.

ParameterTypeRequiredDescription
statusarrayNoOptional array of statuses to filter by: 'draft', 'pending_review', 'in_review', 'changes_requested', 'approved', 'review_completed', 'merged', 'rejected', 'closed'.
typearrayNoOptional array of types to filter by: 'review' or 'review_merge'.
agent_idstringNoOptional agent ID to filter reviews by creator.
swarm_idstringNoOptional swarm ID to filter reviews by swarm.
created_afterstringNoOptional ISO date string to filter reviews created after this date.
created_beforestringNoOptional ISO date string to filter reviews created before this date.
updated_afterstringNoOptional ISO date string to filter reviews updated after this date.
updated_beforestringNoOptional ISO date string to filter reviews updated before this date.
title_containsstringNoOptional string to filter reviews whose title contains this text.
limitnumberNoOptional maximum number of results to return.
offsetnumberNoOptional number of results to skip for pagination.
sort_bystringNoOptional field to sort results by: 'createdAt', 'updatedAt', or 'status'.
sort_orderstringNoOptional sort order: 'asc' or 'desc'.

review_update

Updates an existing merge request review. Can modify the title, description, status, files changed, diff patch, and other properties. Only provide the fields you want to update.

ParameterTypeRequiredDescription
review_idstringYesThe unique identifier of the review to update.
typestringNoOptional new type: 'review' or 'review_merge'.
statusstringNoOptional new status: 'draft', 'pending_review', 'in_review', 'changes_requested', 'approved', 'review_completed', 'merged', 'rejected', 'closed'.
titlestringNoOptional new title for the review.
descriptionstringNoOptional new description of the changes.
major_files_changedarrayNoOptional new array of main file paths that were changed.
diff_patchstringNoOptional new unified diff/patch content.
issues_facedarrayNoOptional new array of issues encountered.
remaining_tasksarrayNoOptional new array of remaining tasks.
merge_strategystringNoOptional new merge strategy: 'patch' or 'git_worktree'.
changes_file_pathstringNoOptional new path to changes summary file.
task_descriptionstringNoOptional new extended task description.

review_submit

Submits a merge request review for review. This changes the review status from 'draft' to 'pending_review', making it visible to reviewers.

ParameterTypeRequiredDescription
review_idstringYesThe unique identifier of the review to submit.

review_approve

Approves a merge request review. Adds an approval feedback from the specified agent with an optional comment. This indicates that the changes are acceptable and ready for merge.

ParameterTypeRequiredDescription
review_idstringYesThe unique identifier of the review to approve.
agent_idstringYesThe ID of the agent approving the review.
agent_namestringYesThe name of the agent approving the review.
commentstringNoOptional comment to accompany the approval.

review_request_changes

Requests changes on a merge request review. Adds a request_changes feedback from the specified agent with a comment describing what needs to be changed. The submitter will need to address these changes before the review can be approved.

ParameterTypeRequiredDescription
review_idstringYesThe unique identifier of the review to request changes on.
agent_idstringYesThe ID of the agent requesting changes.
agent_namestringYesThe name of the agent requesting changes.
commentstringYesDetailed comment describing what changes are needed.

review_add_comment

Adds a comment to a merge request review. This adds general feedback without approving or requesting changes. Use this for questions, suggestions, or observations about the code changes.

ParameterTypeRequiredDescription
review_idstringYesThe unique identifier of the review to comment on.
agent_idstringYesThe ID of the agent adding the comment.
agent_namestringYesThe name of the agent adding the comment.
commentstringYesThe comment text to add to the review.

Sample Usage

Create a Review

const result = await codebolt.tools.executeTool(
"codebolt.review",
"review_create",
{
type: "review_merge",
initial_task: "Implement user authentication feature",
title: "Add JWT authentication",
description: "Implemented JWT-based authentication with refresh tokens",
major_files_changed: ["src/auth/jwt.ts", "src/middleware/auth.ts"],
diff_patch: "--- a/src/auth/jwt.ts\n+++ b/src/auth/jwt.ts\n...",
agent_id: "agent-001",
agent_name: "CodeBot",
merge_strategy: "patch"
}
);

List Reviews with Filters

const result = await codebolt.tools.executeTool(
"codebolt.review",
"review_list",
{
status: ["pending_review", "in_review"],
agent_id: "agent-001",
sort_by: "createdAt",
sort_order: "desc",
limit: 10
}
);

Submit and Approve a Review

// Submit a draft review
const submitResult = await codebolt.tools.executeTool(
"codebolt.review",
"review_submit",
{ review_id: "review-123" }
);

// Approve the review
const approveResult = await codebolt.tools.executeTool(
"codebolt.review",
"review_approve",
{
review_id: "review-123",
agent_id: "reviewer-001",
agent_name: "ReviewBot",
comment: "LGTM! Code quality is good."
}
);

Request Changes

const result = await codebolt.tools.executeTool(
"codebolt.review",
"review_request_changes",
{
review_id: "review-123",
agent_id: "reviewer-001",
agent_name: "ReviewBot",
comment: "Please add error handling for the edge cases in jwt.ts"
}
);

Add a Comment

const result = await codebolt.tools.executeTool(
"codebolt.review",
"review_add_comment",
{
review_id: "review-123",
agent_id: "reviewer-001",
agent_name: "ReviewBot",
comment: "Consider using a more descriptive variable name on line 45"
}
);

Update Review Details

const result = await codebolt.tools.executeTool(
"codebolt.review",
"review_update",
{
review_id: "review-123",
title: "Updated: Add JWT authentication with MFA",
description: "Added multi-factor authentication support",
remaining_tasks: ["Add unit tests for MFA flow"]
}
);
info

Review types include 'review' for review only and 'review_merge' for review with merge capability. Status values include: draft, pending_review, in_review, changes_requested, approved, review_completed, merged, rejected, and closed.