# List API keys

Tool: `veryfront__list_api_keys`

List the caller's API keys, or the keys bound to one project, newest first; every surface returns active keys unless status selects expired, revoked or all.

## Arguments

| Name                | Type                                  | Required | Description                                                                                                                                                                                                           |
| ------------------- | ------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cursor`            | string                                |          | Opaque cursor pointing at the next page. Omit it to read the first page.                                                                                                                                              |
| `limit`             | number · min 1 · max 100 · default 20 |          | Maximum number of entries to return. Defaults to 20 and is capped at 100.                                                                                                                                             |
| `project_reference` | string                                |          | Project ID or slug. Listing the keys bound to a project requires project.api\_keys.read. Omit to list the caller's own keys; a project-scoped API-key caller retains its enforced project when this field is omitted. |
| `status`            | string                                |          | Which keys to list: active (the default), expired, revoked or all. One of `active`, `expired`, `revoked`, `all`.                                                                                                      |
| `sort_by`           | string · default created\_at          |          | Field to sort by. Defaults to created\_at; ties break by key ID ascending. One of `created_at`, `name`, `last_used_at`.                                                                                               |
| `sort_order`        | string · default desc                 |          | Sort direction. Defaults to desc. One of `asc`, `desc`.                                                                                                                                                               |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__list_api_keys",
    "arguments": {}
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"data\":[{\"id\":\"string\",\"project_id\":\"string\",\"user_id\":\"string\",\"name\":\"string\",\"key_prefix\":\"string\",\"last_used_at\":\"string\",\"expires_at\":\"string\",\"created_at\":\"string\",\"updated_at\":\"string\",\"status\":\"active\",\"revoked_at\":\"string\",\"scopes\":[\"string\"],\"scope\":\"account\"}],\"page_info\":{\"self\":\"string\",\"first\":null,\"next\":\"string\",\"prev\":\"string\"}}"
      }
    ],
    "structuredContent": {
      "data": [
        {
          "id": "string",
          "project_id": "string",
          "user_id": "string",
          "name": "string",
          "key_prefix": "string",
          "last_used_at": "string",
          "expires_at": "string",
          "created_at": "string",
          "updated_at": "string",
          "status": "active",
          "revoked_at": "string",
          "scopes": [
            "string"
          ],
          "scope": "account"
        }
      ],
      "page_info": {
        "self": "string",
        "first": null,
        "next": "string",
        "prev": "string"
      }
    }
  }
}
```
