CodePanel
get_review_switches

get_review_switches

The CodePanel MCP tool that shows each review switch a repository can set: the deployment's value, its own override and what its next round uses.

On this page›

get_review_switches shows, for one repository, each review switch it can set for itself: the deployment's value, the repository's own override, the value its next round will use, and where that value comes from. It changes nothing and needs the read scope. Call it to find out why a review behaved a certain way, or to check a switch before and after you set it.

When to call it

  • Before setting a switch, to see whether the repository already overrides it.
  • After update_repo_settings with reviewSwitches, to confirm the effective value. The update's own response carries the same table.
  • When a round did something unexpected, such as holding back suggestions or calling reviewer tools. The pipeline stamp of each round records the values it ran with, and this shows what applies now.

Inputs

Input Type Required Description
repo string yes Repository as owner/name

It only reads: the server marks it readOnlyHint: true, so clients that ask before a write can run it without asking.

An unknown repository, or one that belongs to another account, answers Repository not found.

What it returns

{ "repo": "<owner/name>", "reviewSwitches": { ... } }, with one entry for each of fourteen names: REVIEW_CACHEABLE_PROMPTS, REVIEW_REVIEWER_TOOLS, REVIEW_PRECISION_RULES, REVIEW_CHANGED_LINES, REVIEW_LEARNING_ATTRIBUTION, REVIEW_BASE_MERGE_SCOPE, REVIEW_PROOF_GRADING, REVIEW_NOVEL_ESCALATION, REVIEW_HOLD_LATER_SUGGESTIONS, REVIEW_CONFIRM_FIXES, REVIEW_PREFIX_DIAGNOSTICS, REVIEW_ORCHESTRATOR_CACHE, REVIEW_CURRENT_PRACTICE and REVIEW_UNREVIEWED_FILES. Each entry has four fields:

Field Meaning
deployment The deployment's value. While the deployment leaves the variable unset, its default: on for REVIEW_CACHEABLE_PROMPTS and REVIEW_HOLD_LATER_SUGGESTIONS, off for the other eleven. A deployment turns a switch on only with the value 1
override The repository's own true or false. null means it has none
effective The value the repository's next round uses
source repository when override decides it, deployment when the deployment sets the variable, default when neither does

A repository's override always beats the deployment. deployment and source depend on how the deployment is configured, so they can differ between a self-run test backend and the hosted service. Read the values at call time and don't assume them.

Switches the repository cannot set, for example the orchestrator's tools, are not listed.

Examples

These responses come from a test account on a local backend, trimmed to two of the fourteen switches. The deployment values come from that backend, not from the hosted service.

Call
{ "repo": "codepanel-dev/web-app" }
Result (trimmed)
{
  "repo": "codepanel-dev/web-app",
  "reviewSwitches": {
    "REVIEW_CACHEABLE_PROMPTS": {
      "deployment": true,
      "override": null,
      "effective": true,
      "source": "default"
    },
    "REVIEW_REVIEWER_TOOLS": {
      "deployment": false,
      "override": null,
      "effective": false,
      "source": "default"
    }
  }
}

Both entries have override: null, so the repository follows the deployment, and source: "default" says the deployment sets neither.

The same step without MCP

Surface Form
CLI codepanel repos switches <owner/name> (CLI)
HTTP API GET /repos/switches?repo=owner/name

What the server tells your agent

The description your agent reads when it lists the tools:

The review switches a repository can set for itself (REVIEW_CACHEABLE_PROMPTS, REVIEW_REVIEWER_TOOLS, REVIEW_PRECISION_RULES, REVIEW_CHANGED_LINES, REVIEW_LEARNING_ATTRIBUTION, REVIEW_BASE_MERGE_SCOPE, REVIEW_PROOF_GRADING, REVIEW_NOVEL_ESCALATION, REVIEW_HOLD_LATER_SUGGESTIONS, REVIEW_CONFIRM_FIXES, REVIEW_PREFIX_DIAGNOSTICS, REVIEW_CURRENT_PRACTICE, REVIEW_ORCHESTRATOR_CACHE, REVIEW_UNREVIEWED_FILES), each with the deployment's value (its default while unset: on for REVIEW_CACHEABLE_PROMPTS and REVIEW_HOLD_LATER_SUGGESTIONS, off for the others), the repository's own (override, null for none), the effective one its next round uses, and its source (repository, deployment or default). Each round's pipeline stamp records the values it ran with.

Last updated