# list_secrets

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

The CodePanel MCP tool that lists Zero-Trust environment secret names and scopes without ever exposing plaintext values.

`list_secrets` lists the names, scopes (`account` or `repo`), and update timestamps of Zero-Trust environment secrets. Secret values are AES-256-GCM encrypted at rest and never returned over any API, MCP tool, or prompt.

## When to call it

- **To verify which environment variable names are available to cloud sandboxes** before queuing tasks that need API keys, database URLs, or test credentials.

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `repo` | string | no | 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.

## What it returns

`{ secrets }`, an array of `{ id, name, scope, repo, updatedAt }`. To add or rotate a secret value without exposing it to an agent's context, use Repository → Settings → Environment & Secrets in the browser.

## The same step without MCP

| Surface | Form |
| --- | --- |
| HTTP API | `GET /autopilot/secrets` (optional `?repo=owner/name`) |
| CLI | `codepanel env secrets [--repo owner/name]` |
| Dashboard | Repository → Settings → Environment & Zero-Trust Secrets |

## What the server tells your agent

The description your agent reads when it lists the tools:

> Use it to see which Zero-Trust environment secret names exist for the account or a repository. Secret values are encrypted at rest and never returned; add or update secret values in CodePanel Repository Settings.

## Related

- [`delete_secret`](/docs/mcp-server/delete_secret): remove an unused secret.
- [`get_environment`](/docs/mcp-server/get_environment): inspect a repository's environment and applicable secret names.
- [MCP server](/docs/mcp-server): install, sign-in and every other tool.
