get_panel_recommendation
The CodePanel MCP tool that previews the reviewers and orchestrator for a cost and quality goal, with estimated cost. It changes nothing.
On this page›
get_panel_recommendation previews the panel CodePanel would build for a goal, such as cost: "low" and quality: "high", with the model, estimated cost and reason for every seat. It changes nothing. Call it before apply_panel to see what would change and what a round and a pull request would cost. It needs only the read scope.
When to call it
- Before you apply a panel.
unchangedandnextActionsay whetherapply_panelwith the same arguments would change anything. - To price a setup.
estimategives dollars per round and per pull request, andcomparisonsets that against the panel as it is now. - To check a limit. With
maxUsdPerPr,budgetsays whether the plan fits and which cuts were needed.
apply_panel takes the same inputs and writes the result. This tool has no side effects, so you can call it as often as you like and compare goals.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
cost |
low or medium or high |
no | How much to spend: picks the model tiers. Default medium |
quality |
low or medium or high |
no | How thorough: picks the roles and effort. Default medium |
repo |
string | no | Set up this repository alone, priced from its own recent rounds |
panelId |
string | no | Without repo: the panel to change; default panel if left out |
roles |
array of strings | no | Role ids from list_roles, instead of the goal's |
provider |
string | no | Keep every seat on this provider |
maxUsdPerPr |
number | no | Spend at most this per pull request; apply also sets it as the panel's limit |
It only reads: the server marks it readOnlyHint: true, so clients that ask before a write can run it without asking.
cost picks the model tiers and quality picks the roles and reasoning effort. Each defaults to medium. Ask for a panel by goal has the table of what each level does.
- What is priced against what. With
repo, the estimate uses that repository's own recent rounds, up to the last 30, and the recommendation targets that repository's own panel. Without it, the estimate uses typical call sizes and the target ispanelId, or your default panel. - Existing seats stay. Without
roles, the recommendation keeps the target panel's current reviewers and their roles, and the goal changes their models and effort. Passroles(ids fromlist_roles) to choose a different lineup. providerkeeps every seat on one provider.maxUsdPerPrcuts tiers and roles until the estimate fits, and it is a positive amount in dollars.
Errors a caller can hit:
| Message | Cause |
|---|---|
Pass repo or panelId, not both. |
Both were given |
unknown role <id>; roles must be role ids from GET /roles: <ids> |
A roles entry that list_roles does not return |
maxUsdPerPr must be a positive number |
A zero or negative limit. The tool's schema usually rejects it first |
No working API key for <provider>. Add one in Settings first. |
provider names one with no key and no credits |
None of your providers reports a model that can review code. |
No key reaches a model for a tier |
Panel not found |
An unknown panelId, or one that is not yours |
What it returns
goal,repoandtarget.target.scopeisrepo,defaultorpanel, andtarget.panelIdisnullwhen applying would give the repository its own panel.target.notesays which panels apply would and would not touch.reviewersandorchestrator: each seat withtier,provider,modelId, a readablemodel,reasoningEffort,source(own_key, orcreditswhen no key of yours reaches the tier),usdPerRound(nullfor a model with no price) andreason. A reviewer also has itsrole, andagentIdwhen it matches an existing seat.estimate:usdPerRound,usdPerPr,roundsPerPrand the token sizes behind them.basisisrepo_historyortypical, andsampleRoundsis how many rounds the history held. Prices are list prices without prompt-cache discounts, and only successful calls count. A model with no price is named inunpricedand left out of the totals.comparison: the panel's current cost a round andestimatedReductionUsdPerPr, positive when the recommendation is cheaper. Either isnullwhen a model on either side is unpriced.budget:maxUsdPerPr,fitsand thechangesmade to fit.fitsisnull, and nothing is cut, when a seat has no price.current: the target panel's seats now.changes: one line per seat saying what applying would do to it.unchangedandnextAction:apply, ornonewhen the target panel already runs this setup.
The reason on a seat says what CodePanel measured for that choice, or that it has not measured it. Treat the dollar figures as estimates, not a quote: the sample below is a seed-data run.
Examples
These responses come from a test account on a local backend. Model ids and prices are seed values, not real prices.
Preview a low-cost, high-quality panel for one repository
{
"repo": "codepanel-dev/web-app",
"cost": "low",
"quality": "high"
}
The real result is about 6 KB. This copy keeps the first of four reviewers in changes, reviewers and current, cuts each reason and the estimate.note after their first sentence, and marks each cut with an ellipsis.
{
"budget": {
"changes": [],
"fits": null,
"maxUsdPerPr": null
},
"changes": [
"Retain Bugs & Security (k57f28zq4gs6631q0x3yrpb54s8j704w): keep its instructions and history; use anthropic/claude-haiku-5-5 at high effort."
],
"comparison": {
"currentUsdPerRound": 0.212525,
"estimatedReductionUsdPerPr": 0.22649249999999999,
"note": "Both configurations priced on the same token profile. Estimates exclude subscription fees, prompt-cache effects and quality-related changes in review volume. Positive reduction is estimated savings; negative is extra cost."
},
"current": {
"orchestrator": {
"agentId": "k5775rqpcnqr3m3mz31d47xr5h8j7kcm",
"modelId": "claude-opus-5-5",
"name": "Orchestrator",
"provider": "anthropic",
"reasoningEffort": "medium"
},
"reviewers": [
{
"agentId": "k57f28zq4gs6631q0x3yrpb54s8j704w",
"modelId": "claude-sonnet-5-5",
"name": "Bugs & Security",
"provider": "anthropic",
"reasoningEffort": "medium"
}
]
},
"estimate": {
"basis": "repo_history",
"note": "Medians of this repository's last 5 rounds. …",
"orchestratorInputTokens": 14000,
"orchestratorOutputTokens": 1600,
"reviewerInputTokens": 23750,
"reviewerOutputTokens": 1200,
"roundsPerPr": 1.3,
"sampleRounds": 5,
"unpriced": [],
"usdPerPr": 0.04979,
"usdPerRound": 0.0383
},
"goal": {
"cost": "low",
"quality": "high"
},
"nextAction": "apply",
"orchestrator": {
"model": "Sonnet 5.5",
"modelId": "claude-sonnet-5-5",
"provider": "anthropic",
"reason": "Balanced orchestrator: …",
"reasoningEffort": "high",
"source": "own_key",
"tier": "balanced",
"usdPerRound": 0.026399999999999996
},
"repo": "codepanel-dev/web-app",
"reviewers": [
{
"agentId": "k57f28zq4gs6631q0x3yrpb54s8j704w",
"model": "Haiku 5.5",
"modelId": "claude-haiku-5-5",
"name": "Bugs & Security",
"provider": "anthropic",
"reason": "Kept this existing seat, its instructions and history. …",
"reasoningEffort": "high",
"role": "bugs-security",
"source": "own_key",
"tier": "economy",
"usdPerRound": 0.002975
}
],
"target": {
"note": "Applying gives codepanel-dev/web-app its own panel; your default panel and other repositories are not changed.",
"panelId": null,
"scope": "repo"
},
"unchanged": false
}
Three things to read in it:
target.panelIdisnullandscopeisrepo: this repository has no panel of its own yet, so applying would create one and leave the default panel alone.sampleRoundsis 5, soestimaterests on five rounds of this repository, not the 30 it can use.roundsPerProf 1.3 comes from the same history.cost: "low"put every reviewer on the economy tier, andquality: "high"raised their effort. The orchestrator stays on the balanced tier.
The same step without MCP
| Surface | Form |
|---|---|
| CLI | codepanel panel recommend --cost low --quality high --repo owner/name, with --panel, --roles a,b, --provider and --max-usd-per-pr (CLI) |
| HTTP API | GET /panels/recommend, with roles as one comma-separated string |
What the server tells your agent
The description your agent reads when it lists the tools:
Recommend reviewers and an orchestrator for a goal, e.g. cost "low", quality "medium". Changes nothing. Each seat has its role, provider, model, effort, source (own_key or credits), usdPerRound and a reason citing what CodePanel measured. estimate has usdPerRound and usdPerPr with its basis (repo_history from the repository's recent rounds, or typical). budget says whether it fits maxUsdPerPr and what was cut to fit. target says which panel apply_panel would change; current is that panel now; unchanged and nextAction (apply or none) say whether applying would change anything.
Related
apply_panel: writes this recommendation and returns anundo.restore_panel: puts the panel back.list_modelsandlist_roles: the models and roles it chooses from.- Ask for a panel by goal: what each cost and quality level does.
- MCP server: where it fits in tuning cost.