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

# list_my_spaces

> Every space the authenticated user belongs to, marking which ones this MCP connection can use and which is the default.

Lists every space the current user belongs to and marks which ones this MCP connection may use and which one is the default. Useful for agency / multi-client workflows where the user juggles many workspaces.

## When to use

* "What spaces / teams / clients do I have access to?"
* "Am I in the right space?"

## Session scope

A connection covers **one space, the spaces you chose, or all your spaces**. You decide on the Cometly consent screen when you connect, and you also pick a **default space**. Tools run in the default space unless you pass `space_id`.

* `granted` spaces can be used in this session. With an **All my spaces** connection, every space you belong to is granted, including spaces you're added to later. Your membership, your role in that space, and the team's plan are re-checked on every call.
* A space that isn't granted can't be read. Pass its `id` as `space_id` and the call returns an authorization error; reconnect Cometly in your MCP client and include that space.
* On the legacy `/mcp/{space_id}/public-api` URL, the path names the space and a different `space_id` is refused.

## Using `space_id`

Every tool accepts an optional `space_id` argument. Pass the `id` from this tool's output to run a call in a granted space other than the default:

```json theme={null}
{ "name": "list_campaigns", "arguments": { "space_id": "456" } }
```

Custom field and event labels shown in tool descriptions describe the default space. Call [`list_custom_events`](https://docs.cometly.com/mcp/tools/list-custom-events) with `space_id` to see another space's labels.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `format` | string | No | `csv` (default), `json`, or `yaml`. |

## Output

| Column | Meaning |
| - | - |
| `id` | The space ID. Pass it as `space_id` to other tools. |
| `name` | The space name. |
| `team` | The team the space belongs to. |
| `granted` | `true` if this connection may use the space. |
| `default` | `true` for the space tools run in when you don't pass `space_id`. |

```csv theme={null}
id,name,team,granted,default
123,Acme Marketing,Acme Inc.,true,true
456,Beta Co.,Acme Inc.,true,false
789,Client A,Agency LLC,false,false
```

The `current` column from earlier versions is gone; use `default`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.