# get_agent_defaults

URL: https://codepanel.ai/docs/mcp-server/get_agent_defaults

The CodePanel MCP tool that reads the account's default agent or team per role: new threads, swarm workers, planner, fallback.

`get_agent_defaults` reads which agent or team the owner wants by default for each role. It needs the `read` scope.

## When to call it

- **Before starting work for the owner** with [`start_task`](/docs/mcp-server/start_task), to send it to the agent or team they chose for new threads rather than guessing.
- **Before changing a default** with [`set_agent_defaults`](/docs/mcp-server/set_agent_defaults), to keep the values you will need to undo it.

## 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

One entry per role: `newThread`, `swarmWorker`, `planner` and `fallback`. Each has:

- `value`: `auto`, `agent:<id>` or `team:<id>`; send it back to keep the role as it is.
- `name`: the agent's or team's name, or `null` for `auto`.
- `removed`: `true` when the agent or team it named was deleted; it then reads as `auto` until set again.
- `inUse`: whether anything reads the role yet. Only `newThread` is read today: the desktop app's composer starts a new thread from it. The other three are kept for swarms and read by nothing until they ship. `start_task` without a worker still uses the repository's team.

## The same step without MCP

| Surface | Form |
| --- | --- |
| HTTP API | `GET /autopilot/defaults` with the `read` scope |
| CLI | `codepanel defaults` |
| Desktop app | Settings, Models & providers, Defaults |

## What the server tells your agent

The description your agent reads when it lists the tools:

> Use it before starting work for the owner, to see which agent or team they want by default. Returns newThread, swarmWorker, planner and fallback, each { value (auto, agent:<id> or team:<id>), name, removed, inUse }. Only newThread is read today (the desktop composer starts from it); inUse false means nothing reads that role yet.

## Related

- [`set_agent_defaults`](/docs/mcp-server/set_agent_defaults): change them.
- [`list_coding_agents`](/docs/mcp-server/list_coding_agents) and [`list_teams`](/docs/mcp-server/list_teams): the agents and teams a default can name.
- [MCP server](/docs/mcp-server): install, sign-in and every other tool.
