# List workspaces

List where this credential may work, with the tenancy selector for each.

## Contract status

Preview contract: these routes and tools are implemented in the shared contract, but the public host, customer API access and OAuth flow have not been deployment verified.

## Endpoint: GET /v1/workspaces

- Method: `GET`
- Path: `/v1/workspaces`
- Authentication: Bearer API credential or OAuth access token
- Required scope: `context:read`
- MCP tool: `get_context`
- MCP action: `workspaces`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |

## Known errors

- 400 invalid_request for an invalid filter, identity or limit.
- 401 authentication_required for a missing or invalid credential.
- 402 subscription_required when access is not entitled.
- 403 authorization_required for a missing scope or unavailable preview access.
- 403 workspace_not_accessible when x-genviral-tenancy names a workspace the credential cannot reach.
- 404 not_found when the record is outside the accessible catalogue.
- 429 rate_limited; honor Retry-After when present.

## Request

This read has no query parameters. Call it before naming a workspace so you never guess an id.

```
curl --get 'https://api.peekpanda.com/v1/workspaces' \
  --header "Authorization: Bearer $PEEKPANDA_TOKEN" \
  --header 'x-genviral-tenancy: personal'
```

## MCP request

Call get_context with action workspaces. Path fields go in params, filters in query, and a write body in body.

```
{
  "name": "get_context",
  "arguments": {
    "request": {
      "action": "workspaces"
    }
  }
}

```

## Response

Each row carries the selector to send back as x-genviral-tenancy, or as the MCP workspace field. An API key and a connection pinned to one workspace list only that tenancy. An all-access connection lists personal plus every workspace its owner can currently reach.

```
{
  "data": [
    {
      "selector": "personal",
      "kind": "personal",
      "name": "Personal space"
    },
    {
      "selector": "33333333-3333-4333-8333-333333333333",
      "kind": "workspace",
      "name": "Growth team"
    }
  ]
}

```

## Source

The credential itself and current workspace membership. Nothing is collected.

## Refresh

Membership is read on every request, so a workspace the owner leaves drops out immediately.
