# set_review_rounds

URL: https://codepanel.ai/docs/mcp-server/set_review_rounds

The CodePanel MCP tool that sets how many automatic review rounds one pull request gets, to extend or end the fix-and-review loop.

`set_review_rounds` sets how many automatic review rounds one pull request gets, which is how your agent ends the fix-and-review loop or asks for one more pass. It does what a `/rounds` comment does, and it needs `repo`, `pr` and `rounds`, plus the `reviews:write` scope.

## When to call it

- **To stop.** `"stop"` when the gate is green and you don't want a push to start another paid round. The round already running still posts.
- **To extend, once your user has asked.** `"+1"` when a finding needs a second look after the limit was reached, or when the push changed code no round has read. Raising a limit costs a round, so don't do it just to reach green.
- **To go back to the default.** `"reset"` clears this pull request's own limit, and the repository's setting applies again.

The limit and what counts toward it are in [Round limits](/docs/triggering-reviews#round-limits).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `repo` | string | yes | Repository as owner/name |
| `pr` | integer | yes | Pull request number |
| `rounds` | integer, at most 50 or string | yes | 0 to 50 (0 stops, like "stop"), "+N", "stop" or "reset" |

It writes: the server marks it `readOnlyHint: false` and `destructiveHint: true` (it can change what is already there), so a client that asks before writes asks here.

`rounds` takes one of these:

| Value | Effect |
| --- | --- |
| a number, `1` to `50` | This pull request gets that many automatic rounds in all |
| `"+N"` | At least N more after the current one, so the next push is reviewed. It never lowers a limit that already allows that, and leaves a pull request with no limit alone |
| `"stop"`, or `0` | No automatic round after the current one |
| `"reset"` | Back to the repository's setting |

A value it can't read fails with `rounds must be a number from 1 to 50, +N, stop or reset`. The same words a `/rounds` comment accepts also work as strings (`more`, `continue`, `done`, `off`, `default`), as listed in [Commands](/docs/commands#rounds).

Because the token acts as the repository's owner, the ceiling that applies to a bot commenting `/rounds` doesn't apply here.

## What it returns

| Field | Meaning |
| --- | --- |
| `limit` | The limit that now applies, or `null` for none |
| `completed` | Rounds done on this pull request |
| `running` | Whether a round is running now |
| `reviewQueued` | `true` when raising the limit queued a review of a head the old limit had skipped. It runs only if no round has reviewed that head |

Raising a limit the pull request had reached also reviews the current head once, if no round has. That is the only way this call starts a review.

## Examples

These responses come from a test account on a local backend.

```json title="Call"
{
  "repo": "codepanel-dev/web-app",
  "pr": 142,
  "rounds": "+2"
}
```

```json title="Result"
{
  "limit": 4,
  "completed": 2,
  "running": false,
  "reviewQueued": false
}
```

Two rounds were complete and the limit stood at 2, so `"+2"` made it 4. `reviewQueued` is `false`: the head had already been reviewed, so there was nothing to queue.

## The same step without MCP

| Surface | Form |
| --- | --- |
| Pull request comment | `/rounds 3`, `/rounds +1`, `/rounds stop` or `/rounds reset` ([Commands](/docs/commands#rounds)) |
| CLI | `codepanel rounds owner/name#123 <n\|+n\|stop\|reset>` ([CLI](/docs/cli)) |
| HTTP API | [`POST /reviews/rounds`](/docs/api#post-reviewsrounds) |

## What the server tells your agent

The description your agent reads when it lists the tools:

> How many automatic review rounds this pull request gets, for ending or extending the fix-and-review loop. rounds: a number (this many in all), "+1" (at least one more after the current one), "stop" (none after the current one; it still posts), or "reset" (back to the repository's setting). Raising a limit the pull request had reached also reviews the current head if it was skipped. Same as commenting /rounds on the pull request. Returns the limit that now applies, the rounds done and whether a review was queued.

## Related

- [`trigger_review`](/docs/mcp-server/trigger_review): refused past the limit this tool sets.
- [`get_review`](/docs/mcp-server/get_review): `rounds` shows the limit and what has been used.
- [Round limits](/docs/triggering-reviews#round-limits): what counts as a round.
- [MCP server](/docs/mcp-server): install, sign-in and every other tool.
