GitLab Duo Review
duo_reviewRun a code review with GitLab Duo CLI and get a structured JSON result with summary and issues. Handles non-JSON responses by returning degraded status with raw text.
Instructions
Run a code review with the GitLab Duo CLI and return a normalized, fault-tolerant result. Use this to get a 'second opinion' review of a diff or set of files: pass a unified diff (and/or files/instructions), and you get back a stable JSON structure with a summary and a list of issues (type, severity, file, line, message, suggestion). If Duo answers with prose instead of JSON, the result is still returned with degraded: true and the raw text in summary/raw. Your agent can then act on the issues (e.g. write fixes).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory to run Duo in for this call. | |
| diff | No | Unified diff to review (e.g. output of `git diff`). | |
| goal | No | Override the entire prompt sent to Duo. When set, diff/files/instructions are ignored. | |
| files | No | File paths to focus the review on. | |
| model | No | Override the Duo model for this call. | |
| timeoutMs | No | Override the run timeout (milliseconds) for this call. | |
| instructions | No | Extra free-form guidance for the reviewer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when Duo exited successfully and did not time out. | |
| raw | Yes | Raw (truncated) Duo output for debugging. | |
| meta | Yes | ||
| issues | Yes | Normalized list of findings. | |
| summary | Yes | Review summary, or raw text when degraded. | |
| degraded | Yes | True when output could not be parsed as JSON (raw text fallback). |