CodePanel
update_panel

update_panel

The CodePanel MCP tool that renames a review panel or sets its per-pull-request spending limit in dollars, or turns the limit off.

On this page›

update_panel renames a panel or sets its spending limit per pull request, in US dollars. A positive budgetUsd sets the limit and null turns it off. It returns { "ok": true } and needs the panel:write scope.

When to call it

  • To cap what one pull request can cost the panel. The limit counts every billed review call across all of the pull request's rounds. Once it is reached, a new round is refused before any model is called.
  • To lift the cap with budgetUsd: null, when a large change keeps being refused.
  • To rename a panel.
  • Not for the monthly budget or a repository's cap. Those are set_budget, with a different scope, budget:write.

Inputs

Input Type Required Description
panelId string yes Panel id, from get_panel
name string no
budgetUsd number or null no

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.

The panelId comes from get_panel. Both name and budgetUsd are optional, and a field you leave out stays as it is. Sending neither changes nothing and still answers ok.

  • Default limit. A panel that never set a limit runs under the $5 default. get_panel shows that as budgetIsDefault: true. null is different from the default: it removes the limit entirely.
  • Shared panels. The limit belongs to the panel, so it applies to every repository that reviews with it. Your default panel serves every repository without a panel of its own. To change one repository only, use apply_panel with repo and maxUsdPerPr, which gives that repository its own panel.
  • Unpriced models. Calls to a model with no known price count as $0, so a limit cannot hold a panel with one. get_panel marks that member priced: false.

Errors a caller can hit:

Message Cause
Name is required A name that is empty after trimming
A spending limit must be a positive amount. A budgetUsd of 0 or less. The tool's schema already rejects it before the call
Panel not found An unknown panelId, or one that is not yours

What it returns

{ "ok": true }. Read the panel back with get_panel: budgetUsd holds the limit in force and is absent when it is off.

Examples

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

Set a $3 limit on the default panel

Call
{
  "panelId": "vs70ed0fnnwbezvqqcyskr6xvn8j7syc",
  "budgetUsd": 3
}
Result
{
  "ok": true
}

The same step without MCP

Surface Form
CLI codepanel panel set --budget 3, or --budget none; --name renames; --panel <id> picks the panel (CLI)
HTTP API POST /panels/update

What the server tells your agent

The description your agent reads when it lists the tools:

Rename a panel or set its per-pull-request spending limit in USD (null clears).

Last updated