get_route_preview
The CodePanel MCP tool that shows which agent a task on a repository routes to now and why, with each agent's record and cost range there.
On this page›
get_route_preview shows who a task on one repository would run on now, and why. It is the read behind the desktop app's model picker. It needs the read scope.
When to call it
- Before
start_taskwithout an agent or team, to see the team the task goes to and the member routing by record picks for its work. - When choosing an agent or a model for a task, to compare each agent's record on that repository and a task's cost range on each model.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
repo |
string | yes | The repository, owner/name |
It only reads: the server marks it readOnlyHint: true, so clients that ask before a write can run it without asking.
What it returns
auto: where a task that names no agent or team goes. Forkind: "team", the team is the repository's own team (via: "repo"), else the account's default (via: "default").pickis the member its work routes to now, withreason(record,pinned,team_orderand so on) andnote.nextis the member one step up when that member fails a check.kind: "agent"means no team serves the repository and the first agent works the task alone.agents: every coding agent, with:- its model's
facts: context, prices per 1M tokens, the cache read price; source, what pays for it;record, its runs on this repository overrecordDays: tasks, changes,firstTry,usdPerChangeandmsPerChange;estimate, a task's cost range here;unavailable, why it cannot run now, or null. It is set when the agent's only way to its model is a CodePanel key that is invalid or expired; Auto routes past it.
- its model's
models: models your keys, credits or machine reach that no agent runs yet.create_coding_agentputs one to work.platformDown: CodePanel's provider keys that are dead now, each with anotesaying why. Models you reach only through one are left out ofmodelsuntil the key works again; your own key for that provider brings them back at once.teams, andsampleRuns: how many of the repository's recent runs the estimates are sized from.
An estimate prices the middle half of those runs' token counts at the model's rate, with their cache share. It is null when the repository has no runs yet, or when the model has no listed price. Records are read for every member of the auto team, and for other agents up to 16 in all; past that, record is "unread".
The same step without MCP
| Surface | Form |
|---|---|
| HTTP API | GET /autopilot/route?repo=owner/name with the read scope |
| CLI | codepanel route owner/name |
What the server tells your agent
The description your agent reads when it lists the tools:
Use it before start_task to see who a task on a repository would run on, or to pick a cheaper agent or model; not for a run already going (get_run). For one repository (owner/name), returns auto: the team a task that names no agent or team goes to (the repository's, else the account's default), the member routing by record picks for its work now with reason and note (the cheapest member whose record here clears the bar, else the team's order), and next, the member one step up when that one fails a check. agents lists every coding agent with its model's facts (context, prices per 1M tokens, cache read price), what pays for it, its record on this repository (tasks, changes, firstTry, usdPerChange, msPerChange) and estimate, a task's cost range here. models lists models no agent runs yet. Reads only, makes no model call.
Related
get_agent_records: records across every repository.start_task: start the task.- MCP server: install, sign-in and every other tool.