execute_and_review
Apply approved code changes with syntax checks, formatting, backups, and safe git commits; optionally preview via dry run and return a review prompt for architectural critique.
Instructions
Step 4: Execute changes with full safety net.
Process:
Normalize line endings (CRLF → LF)
Apply diffs using unified patching (handles overlaps)
Validate syntax and run ESLint/TypeScript if available
Auto-format with user's prettier config (or detected style)
Back up originals to .mcp-backups/
Write changes to disk
Check git state (detached HEAD, rebase, hooks)
Stage & commit (with graceful hook failure handling)
Return mirror critique prompt for AI review
Set approved=true to proceed. Use dry_run=true to preview without writing.
Mirror critique: The response includes a prompt with modified code that you should analyze to provide honest architectural review (not automated).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>"
},
"name": "execute_and_review"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| approved | No | ||
| session_id | Yes |