> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended**:
> ```bash
> npx @scalekit-inc/cli setup
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Pagination

List endpoints return results one page at a time. Send `page_size` for how many you want. Each response carries `next_page_token`: pass it as `page_token` to get the next page, and stop when it comes back empty.

Responses also carry `prev_page_token`, to page back, and `total_size`, the count across all pages.

## Endpoints that page

| Endpoint | Max page_size |
| --- | --- |
| [List connected accounts](https://docs.scalekit.com/agentkit/reference/connected-accounts/list-connected-accounts/) | 99 |
| [Search connected accounts](https://docs.scalekit.com/agentkit/reference/connected-accounts/search-connected-accounts/) | 30 |
| [List tools](https://docs.scalekit.com/agentkit/reference/tools/list-tools/) | 1000 (default 300) |
| [List a user's scoped tools](https://docs.scalekit.com/agentkit/reference/tools/list-scoped-tools/) | No set limit |
| [List tools available to a user](https://docs.scalekit.com/agentkit/reference/tools/list-available-tools/) | No set limit |
| [List Virtual MCP servers](https://docs.scalekit.com/agentkit/reference/virtual-mcp-servers/list-virtual-mcp-servers/) | 30 |

## Good to know

- Page tokens are opaque. Pass them back as they are; don't build or parse them.
- Send the same filters with every page, such as `connector` or `identifier`.
- The Node.js list methods take `pageSize` and `pageToken` and return `nextPageToken`. In Python, `actions.list_tools` and `tools.list_scoped_tools` take `page_size` and `page_token`; to page through connected accounts from Python, call the REST endpoint with `page_token`.

## Examples

### Read every page

REST:

```bash
PAGE_TOKEN=""
while :; do
  RES=$(curl -sS -G "$SCALEKIT_ENVIRONMENT_URL/api/v1/connected_accounts" \
    -H "Authorization: Bearer $TOKEN" \
    --data-urlencode "page_size=50" \
    --data-urlencode "page_token=$PAGE_TOKEN")
  echo "$RES" | jq -c '.connected_accounts[]'
  PAGE_TOKEN=$(echo "$RES" | jq -r '.next_page_token // empty')
  [ -z "$PAGE_TOKEN" ] && break
done
```

Python:

```python
page_token = None
while True:
    # summary=True fills tool_names; without it, read page.tools
    page = actions.list_tools(summary=True, page_size=50, page_token=page_token)
    for name in page.tool_names:
        print(name)
    page_token = page.next_page_token
    if not page_token:
        break
```

Node.js:

```ts
let pageToken: string | undefined;
do {
  const page = await actions.listConnectedAccounts({ pageSize: 50, pageToken });
  for (const account of page.connectedAccounts) console.log(account.id);
  pageToken = page.nextPageToken || undefined;
} while (pageToken);
```

### Response

```json
{
  "connected_accounts": [ ... ],
  "next_page_token": "...",
  "prev_page_token": "",
  "total_size": 240
}
```


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
