# list_credentials

Source: https://botpassword.com/docs/intents/list_credentials

Built. list_credentials lists the credentials this agent client holds grants for, with each one's reference, kind, title, site and the intents its grant allows.

**Status: Built.** Lists the credentials the calling client has live grants for.

## At a glance

| Property | Value |
|---|---|
| MCP tool | `list_credentials` ("List granted credentials") |
| CLI | `bpw agent list_credentials` |
| Default friction | None inside an agent session. It shows only what is already granted, so a credential you have not granted does not appear. |
| Delivery | No value is involved. |
| MCP hints | `readOnlyHint`: true, `destructiveHint`: false, `idempotentHint`: true, `openWorldHint`: false |

## Parameters

`list_credentials` takes no arguments. Send `{}`.

## Example

A `tools/call` request, with placeholder references (use the `id` that `list_credentials` returns):

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_credentials",
    "arguments": {}
  }
}
```

The result. The same JSON is also sent as text in `content[0].text`; `isError` is false for `success`.

```json
{
  "structuredContent": {
    "outcome": "success",
    "credentials": [
      {
        "id": "ITEM-EXAMPLE-01",
        "kind": "api_key",
        "title": "Example deploy token",
        "site": "https://api.example.com",
        "intents": [
          "http_request"
        ]
      },
      {
        "id": "ITEM-EXAMPLE-02",
        "kind": "login",
        "title": "Example dashboard",
        "site": "https://dash.example.com",
        "intents": [
          "sign_in"
        ]
      }
    ]
  },
  "isError": false
}
```

## From the command line

```sh
bpw agent list_credentials
```

`bpw agent <intent>` sends the same request as the MCP tool, through the same policy. Every intent except `status` needs a live agent session, or the answer is `session_required`. Run the harness with `bpw agent run -- <harness>`. On macOS and Linux, an enrolled harness started normally can also be approved in the desktop app or with `bpw session approve`.

## Result fields

Every result is one JSON object. Only `outcome` is always present.

| Field | Type | Meaning |
|---|---|---|
| `outcome` | string | The [typed outcome](/docs/outcomes) code. Always present. |
| `detail` | string | The request ID, rotation step, revision or reason, for the outcomes that carry one. |
| `intent` | string | With `not_implemented`: the intent this build cannot carry out. |
| `reason` | string | With `rejected`: why the call was refused. |
| `message` | string | With `rejected` or `daemon_unavailable`: what was wrong. Never quotes an argument value. |
| `next_step` | string | On a result that is not a plain success: one sentence on what to do now. Fixed text chosen by the outcome code; it never asks for a password or secret and never says to get around a refusal. |
| `hint` | string | Only when the list is empty: one sentence on how to get a first grant. Fixed text; a success still has no `next_step`. |
| `credentials` | array | One entry per granted credential: `id` (the reference other intents take), `kind`, `title`, `site` if it has one, and the `intents` its grant allows. |

## Outcomes it can return

- [`success`](/docs/outcomes/success): The request ran.
- [`session_required`](/docs/outcomes/session_required): The call did not come from inside a live agent session: none was presented, it expired, or it is malformed.
- [`vault_locked`](/docs/outcomes/vault_locked): BotPassword on this device is locked, so no credential can be used.
- [`rejected`](/docs/outcomes/rejected): The request was malformed before policy saw it.
- [`daemon_unavailable`](/docs/outcomes/daemon_unavailable): `bpw mcp` or `bpw agent` could not reach `botpasswordd`, the desktop daemon that holds the keys.

See the [outcome reference](/docs/outcomes) for what each one means and what to do next.

## Limits

- It takes no filter today: it lists every granted credential.
- An empty list means no grant, not no credentials. Ask for one with `request_access`.

## Tool description

What the MCP tool tells the agent, verbatim from `bpw mcp`:

> Lists the credentials this client has grants for, with the intents each grant allows: references, kinds and titles only. This tool never accepts or returns secret values. The result is a typed outcome such as success, vault_locked or scope_denied.

## Related

- [`request_access`](/docs/intents/request_access): asks the person for a grant on one credential, with the intents, scope, lifetime and a one-line reason.
- [`run_with`](/docs/intents/run_with): runs a command with granted credentials injected by BotPassword and returns the exit status and output.
- [`http_request`](/docs/intents/http_request): sends one HTTPS request with a granted credential injected by BotPassword, after checking the origin, path and method against the grant.
- [Intent catalog](/docs/intents), [MCP server](/docs/mcp-server), [Grants and approvals](/docs/grants-and-approvals)
