CodePanel
list_rules

list_rules

The CodePanel MCP tool that lists the autopilot rules that start tasks on their own, with each one's trigger, caps and whether it is on.

On this page›

list_rules returns the account's autopilot rules: what starts a task on its own, and whether each one is on.

When to call it

  • Before making a rule, to see whether one already covers the trigger and repositories.
  • When a rule stopped starting tasks: disabled says who turned it off and why, including CodePanel turning it off after its tasks kept failing.

Inputs

Input Type Required Description

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

What it returns

{ rules }, oldest first. Each rule has:

Field Meaning
id, name, enabled The rule, and whether it starts anything now
trigger, when ci_failed, pr_stalled, dependabot_pr, issue_labeled or schedule, and the same with its setting in words
repos The repositories it watches as owner/name; null is every connected repository
label, idleMinutes, schedule The trigger's one setting: the issue label, the minutes with open findings and no push, or a five-field cron in UTC; null for the others
prompt The task's prompt template; {{placeholders}} are filled from the event
worker, workerName, workerRemoved auto, agent:<id> or team:<id>; an agent or team removed since reads as auto with workerRemoved: true
taskUsd, dayUsd, maxConcurrent Dollars one task may spend, dollars its tasks may spend in a UTC day, and its tasks running at once
createdVia Where it was made: manual (the app), api, mcp or cli
nextFireAt When the schedule or the stalled pull request scan next looks at it; null for a webhook trigger or a rule that is off
failureStreak Its tasks in a row that ended without succeeding
disabled { at, by, reason } while it is off (by is owner or auto); null while it is on
stats Its last 7 days from its tasks' origin: tasks, ended, merged, mergedRate (null until one ended), usd, more (past the 50 newest), and lastEvent (status, summary, skipReason, receivedAt), which says why its last event started nothing, if it did not

A rule CodePanel turned off also stands in get_inbox as a rule_off item until it is on again.

The same step without MCP

Surface Form
HTTP API GET /autopilot/rules with the read scope
CLI codepanel rules
Desktop app Autopilot, Rules

What the server tells your agent

The description your agent reads when it lists the tools:

Use it to see what starts tasks on its own for the owner, and how each rule is doing. Returns { rules }: each with id, name, enabled, trigger and when (in words), repos (null is all), its setting (label, idleMinutes or schedule), prompt, worker, caps (taskUsd, dayUsd, maxConcurrent), createdVia, nextFireAt, failureStreak, disabled (why it is off, by the owner or by CodePanel after 3 failed tasks in a row) and stats (the last 7 days' tasks, merged rate and cost, and the last event with why it was skipped, if it was).

Last updated