> ## Documentation Index
> Fetch the complete documentation index at: https://developers.clay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# tables query-usage

> Show how many tables are enabled for querying and the workspace limit.

Report the workspace-wide count of tables enabled for querying (`used`) and the maximum allowed (`limit`). The limit varies by plan, so read it here rather than assuming a number. Enable a table with [`clay tables update`](/cli/reference/tables-update); at the limit, disable one first.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay tables query-usage
```

## Output

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "used": 3,
  "limit": 10
}
```

| Field   | Type   | Description                                                |
| ------- | ------ | ---------------------------------------------------------- |
| `used`  | number | Number of tables currently enabled for querying.           |
| `limit` | number | Maximum tables that can be enabled for querying (by plan). |

## Errors

| Code             | Exit | Notes                                                                     |
| ---------------- | ---- | ------------------------------------------------------------------------- |
| `auth_forbidden` | 3    | The API key lacks the `cli:all` scope, or you cannot read this workspace. |

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
clay tables query-usage
clay tables query-usage | jq '.limit - .used'   # remaining tables you can enable
```
