perform_code_review
Analyze git changes using specified LLM models to review code for task/feature/bugfix alignment, security, performance, and coding standards, tailored to project context.
Instructions
Performs a code review using a specified LLM on git changes. Requires being run from the root of a git repository.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
diffBase | No | For 'branch_diff' target, the base branch or commit SHA to compare against (e.g., 'main', 'develop', 'specific-commit-sha'). Required if target is 'branch_diff'. | |
llmProvider | Yes | The LLM provider to use (google, openai, anthropic). | |
maxTokens | No | Maximum number of tokens to use for the LLM response. Defaults to 32000 if not specified. | |
modelName | Yes | The specific model name from the provider (e.g., 'gemini-2.5-pro-preview-05-06', 'o4-mini', 'claude-3-7-sonnet-20250219'). | |
projectContext | No | General context about the project, its architecture, or coding standards. | |
reviewFocus | No | Specific areas or aspects to focus the review on (e.g., 'security vulnerabilities', 'performance optimizations', 'adherence to SOLID principles'). | |
target | Yes | The git target to review (e.g., 'staged', 'HEAD', or 'branch_diff'). | |
taskDescription | Yes | Description of the task/feature/bugfix that led to these code changes. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"diffBase": {
"description": "For 'branch_diff' target, the base branch or commit SHA to compare against (e.g., 'main', 'develop', 'specific-commit-sha'). Required if target is 'branch_diff'.",
"type": "string"
},
"llmProvider": {
"description": "The LLM provider to use (google, openai, anthropic).",
"enum": [
"google",
"openai",
"anthropic"
],
"type": "string"
},
"maxTokens": {
"description": "Maximum number of tokens to use for the LLM response. Defaults to 32000 if not specified.",
"exclusiveMinimum": 0,
"type": "number"
},
"modelName": {
"description": "The specific model name from the provider (e.g., 'gemini-2.5-pro-preview-05-06', 'o4-mini', 'claude-3-7-sonnet-20250219').",
"minLength": 1,
"type": "string"
},
"projectContext": {
"description": "General context about the project, its architecture, or coding standards.",
"type": "string"
},
"reviewFocus": {
"description": "Specific areas or aspects to focus the review on (e.g., 'security vulnerabilities', 'performance optimizations', 'adherence to SOLID principles').",
"type": "string"
},
"target": {
"description": "The git target to review (e.g., 'staged', 'HEAD', or 'branch_diff').",
"enum": [
"staged",
"HEAD",
"branch_diff"
],
"type": "string"
},
"taskDescription": {
"description": "Description of the task/feature/bugfix that led to these code changes.",
"minLength": 1,
"type": "string"
}
},
"required": [
"target",
"taskDescription",
"llmProvider",
"modelName"
],
"type": "object"
}