CodePanel
add_reviewer

add_reviewer

The CodePanel MCP tool that adds a reviewer to a panel from a role or a model you choose, and returns its agentId and saved member.

On this page›

add_reviewer adds one reviewer to a panel, either from a role (role: "security") or with a model you pick (provider and modelId). It returns the new reviewer's agentId and its saved member. It needs the panel:write scope, and a panel holds at most 10 reviewers.

When to call it

  • To widen the panel with one deeper pass. A security reviewer on a strong model for sensitive code, or performance for data-heavy changes. list_roles has the ids.
  • To get a second opinion on a role. A reviewer with the same role on another provider is named <Role> (<model>).
  • Not to reshape the whole panel. For that, apply_panel sets every seat from a cost and quality goal and gives you an undo. add_reviewer has none: remove the reviewer with remove_reviewer.

Inputs

Input Type Required Description
panelId string yes Panel id, from get_panel
role string no Role id, from list_roles
provider string no Provider id, from list_models
modelId string no Model id exactly as list_models reports it
reasoningEffort none or low or medium or high or xhigh or max no How hard the model should think
name string no
pathScope object or null no Reviewer trigger paths as globs; null clears. Runs before spending; matched reviewers get full context.
pathScope.include array of strings no
pathScope.exclude array of strings no
systemPrompt string no Instructions; replaces the role's if both are given

It writes: the server marks it readOnlyHint: false, so a client that asks before writes asks here.

The panelId comes from get_panel, and a modelId from list_models.

With a role, CodePanel fills in what you leave out:

  • Model. With provider only, the role's tier model on that provider. With neither, the first provider with a working own key that has a model on the tier, in the order Anthropic, OpenAI, Google, then the rest. CodePanel credits are used only when no own key reaches the tier. A model chosen this way follows its tier: it moves to the tier's newest model, as Choosing models describes. A modelId you pass pins the reviewer instead.
  • Name, instructions and effort. The role's. name, systemPrompt and reasoningEffort override them.

Without a role, provider and modelId are both required, and reasoningEffort defaults to medium. The reviewer is named after its model unless you pass name.

pathScope limits a reviewer to some files: {"include": ["src/server/**"], "exclude": []}. An empty include means every path. Each list takes at most 50 globs of 1 to 200 characters. The scope decides whether the reviewer runs on a round, before any model call, and exclusions win. A reviewer that runs still gets the round's full context.

Errors a caller can hit:

Message Cause
Pass provider and modelId, or a role. Neither a role nor both provider and modelId
Unknown role: <id>. Roles: <ids>. A role that list_roles does not return
Pass provider along with modelId. A modelId and a role, but no provider
<model> is not available to your <provider> key. Refresh the model list in Settings. A model your key did not report
No working API key for <provider>. Add one in Settings first. No valid key, and no credits, for that provider
A panel can have at most 10 reviewers. Remove one to add another. The panel is full
Keep names to 40 characters or fewer. / Keep instructions to 4,000 characters or fewer. name or systemPrompt too long

What it returns

  • agentId: the new reviewer's id. Pass it to update_panel_member or remove_reviewer.
  • member: the reviewer as get_panel lists it, with totalReviews: 0 and totalCostUsd: 0 until it runs.

The new reviewer takes part in later rounds.

Examples

These responses come from a test account on a local backend. Model ids are seed data.

A reviewer from a role, with a model and a path scope

Call
{
  "panelId": "vs70ed0fnnwbezvqqcyskr6xvn8j7syc",
  "role": "performance",
  "provider": "anthropic",
  "modelId": "claude-haiku-5-5",
  "reasoningEffort": "low",
  "pathScope": {
    "include": [
      "src/server/**"
    ],
    "exclude": []
  }
}
Result
{
  "agentId": "k57b8y5bqd1gee3qj97hh43e8x8j692c",
  "member": {
    "_id": "k57b8y5bqd1gee3qj97hh43e8x8j692c",
    "avatar": "robot",
    "callable": true,
    "isDefault": false,
    "modelId": "claude-haiku-5-5",
    "name": "Performance",
    "pathScope": {
      "exclude": [],
      "include": [
        "src/server/**"
      ]
    },
    "priced": true,
    "provider": "anthropic",
    "providerName": "Anthropic",
    "reasoningEffort": "low",
    "slug": "performance",
    "systemPrompt": "Focus on performance: queries or requests inside loops, missing indexes, unbounded reads or pagination, work repeated on every call, needless re-renders and large payloads. Say roughly how the cost grows. Report only concrete problems in the changed code, each with the file, what goes wrong and when. Skip style nits other reviewers will cover.",
    "toolsSupported": true,
    "totalCostUsd": 0,
    "totalReviews": 0,
    "warnings": []
  }
}

The role supplied the name and systemPrompt. reasoningEffort is your low, not the role's medium. There is no followTier because you named the model.

A model the key does not have

Call
{
  "panelId": "vs70ed0fnnwbezvqqcyskr6xvn8j7syc",
  "role": "performance",
  "provider": "anthropic",
  "modelId": "claude-nope"
}
Result (isError: true)
CodePanel: claude-nope is not available to your anthropic key. Refresh the model list in Settings.

Nothing was added. Take the modelId from list_models.

The same step without MCP

Surface Form
CLI codepanel panel add-reviewer --role security, or --provider <p> --model <m> (CLI)
HTTP API POST /panels/reviewers/add

What the server tells your agent

The description your agent reads when it lists the tools:

Add a reviewer to a panel. Prefer a role: it sets the name, instructions and effort, and picks a model on the role's cost tier from your first provider whose own key reaches it (credits if none does). Pass provider (and modelId) to choose the model yourself; without a role both are required. Explicit name, systemPrompt and reasoningEffort override the role's.

Last updated