# ask_reviewer

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

The CodePanel MCP tool that asks the review's orchestrator a question about a finding before you dispute it. Never starts a review; counts toward budget.

`ask_reviewer` asks the review's orchestrator a question about a pull request's review, or about one finding, and waits for the answer. Use it when you don't understand a finding, before you dispute it. It needs `repo`, `pr` and a `question` (or the `questionId` of one still pending), and the `reviews:write` scope plus `read`, since it reads as it waits.

## When to call it

- **A finding is unclear.** Ask with its `ref`, for example `F1`, and the orchestrator answers from the review.
- **Before a dispute.** Confirm you've read the finding right, so you don't dispute one that is correct.
- **A previous call came back `pending`.** Call again with `questionId` set to its `id`. That asks nothing new, so it spends no model call and none of the pull request's question limit.

It never starts a review. If the answer concedes that the finding is wrong, the finding is withdrawn.

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `repo` | string | yes | Repository as owner/name |
| `pr` | integer | yes | Pull request number |
| `question` | string, at most 2000 characters | no | The question, in a sentence or two. Required unless questionId is set |
| `questionId` | string | no | The id of a question that came back pending: wait for its answer instead |
| `ref` | string | no | The finding asked about, e.g. F3 |
| `agent` | string | no | Your name, e.g. claude-code. Defaults to this MCP client's name |
| `timeoutSeconds` | integer, at most 600 | no | Give up waiting after this many seconds (default 180). Each call ends within about 45 seconds; a pending answer comes back with a questionId to keep waiting with. |

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.

Pass either `question` (at most 2,000 characters) or `questionId`. With neither, the call fails with `Pass a question, or the questionId of a pending one`. With `questionId`, the other inputs are ignored. An unknown `ref`, or a pull request with no review yet, is a `400`.

Each pull request takes up to 10 questions an hour. Past that, the call fails with a rate-limit error. Each question also counts toward the account's monthly budget, and the repository's cap, like chat.

`timeoutSeconds` (default 180) is how long one call waits, and each call returns within about 45 seconds whatever you pass (up to 8 minutes in Claude Code when it sends a progress token, as with [`wait_for_review`](/docs/mcp-server/wait_for_review)), so a slow answer comes back `pending` with an `id` to continue with.

## What it returns

The question as it stands:

| Field | Meaning |
| --- | --- |
| `id` | The question's id. Keep it to continue a `pending` one |
| `status` | `answered`, `failed` or `pending` |
| `question`, `ref` | What you asked, and the finding it was about |
| `answer` | The orchestrator's answer when `status` is `answered`, else `null` |
| `concedes` | `true` when the answer conceded the finding was wrong, and it was withdrawn |
| `error` | When `status` is `failed`, why: a budget limit, no key for the orchestrator's provider, or not enough CodePanel credits |
| `model` | The model that answered, or `null` |
| `createdAt`, `answeredAt` | Epoch milliseconds, and `null` for `answeredAt` until answered |

On `pending`, the orchestrator ran out of time on this call. Wait with `questionId`. On `failed`, read `error`: some causes (a budget or a key) need a person, and one that says to ask again can be retried.

## Examples

These responses come from a test account on a local backend. The local backend has fake provider keys, so its orchestrator call fails. What follows is what a caller sees when the model call fails, not an answered question.

```json title="Call"
{
  "repo": "codepanel-dev/web-app",
  "pr": 142,
  "ref": "F1",
  "question": "We run behind one load balancer that overwrites X-Forwarded-For. Does F1 still apply?",
  "agent": "claude-code",
  "timeoutSeconds": 20
}
```

```json title="Result (the model call failed)"
{
  "answer": null,
  "answeredAt": null,
  "concedes": false,
  "createdAt": 1794614664106,
  "error": "the orchestrator call failed; ask again",
  "id": "ss7d5yr823c53amwzv0h2y9rs58j6bkm",
  "model": null,
  "question": "We run behind one load balancer that overwrites X-Forwarded-For. Does F1 still apply?",
  "ref": "F1",
  "status": "failed"
}
```

`status: "failed"` with `error` set and `answer: null` means no answer was given. Ask again, or, if `error` names a budget, key or credits, tell your user.

An answered question has `status: "answered"`, an `answer` and a `model`, and `concedes` is `true` only if the orchestrator agreed the finding was wrong.

## The same step without MCP

| Surface | Form |
| --- | --- |
| Pull request comment | `/ask F3 your question`. It posts a reply on the pull request ([Commands](/docs/commands#ask)) |
| CLI | `codepanel ask owner/name#123 [F3] <question>`, with `--timeout` ([CLI](/docs/cli)) |
| HTTP API | [`POST /reviews/ask`](/docs/api#post-reviewsask), then [`GET /reviews/ask`](/docs/api#get-reviewsask) for a pending one |

## What the server tells your agent

The description your agent reads when it lists the tools:

> Ask the review's orchestrator a question about the pull request's review or one of its findings (pass ref, e.g. F3), and wait for the answer. Use it before disputing a finding you do not understand. Never starts a review; counts toward the account's monthly budget (and the repository's cap) and is limited per pull request. If the answer concedes the finding is wrong, the finding is withdrawn (concedes: true). Status pending means it ran out of time: call again with questionId set to its id to keep waiting, which asks nothing new.

## Related

- [`rate_finding`](/docs/mcp-server/rate_finding): dispute the finding if the answer doesn't change your mind.
- [`get_review`](/docs/mcp-server/get_review): where the findings and their refs come from.
- [Asking about a finding](/docs/mcp-server#asking-about-a-finding): the statuses in one table.
- [Feedback](/docs/feedback): how a dispute is decided.
- [MCP server](/docs/mcp-server): install, sign-in and every other tool.
