# list_teams

`tools/call` · `POST /agent/v1/teams:list`

List the workspace's teams, sorted by name: open teams and the private teams your person is in, or every team for workspace owners and admins. Returns teams, each with its members and whether your person joined it. Archived teams are left out unless archived says otherwise. Needs read access.

- Area: Planning
- Needs the read grant. Read-only. Idempotent.

## Inputs

- `archived` (string, one of: `exclude`, `include`, `only`): Which teams to list: exclude (the default) leaves archived ones out, include adds them, only lists just them.

## Request

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

## HTTP request

The same call over the agent HTTP API, with an agent OAuth access token:

```bash
curl -X POST https://api.qa.clankership.net/agent/v1/teams:list \
  -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "archived": "include"
  }'
```
