Organizations
Tools for listing the organizations available to the current user and, for OAuth connections (e.g. the Claude custom connector), switching which one is active without reconnecting.
note
switch-organization only applies to OAuth-authenticated connections. Scripts and API keys are
already bound to a single organization; send the X-heycreo-Org header instead. See
Organization context.
list-organizations
Lists every heycreo organization the current user belongs to, and which one is currently active for this connection.
Parameters
None.
Response
| Field | Type | Description |
|---|---|---|
organizations[].id | string | Organization id |
organizations[].name | string | Organization name |
organizations[].slug | string | Organization slug, usable as switch-organization input |
organizations[].role | string | The current user's role in this organization |
organizations[].active | boolean | Whether this is the organization currently active for this connection |
Example
Request:
{
"tool": "list-organizations",
"arguments": {}
}
Response:
{
"organizations": [
{ "id": "…", "name": "My Company", "slug": "my-company", "role": "ADMIN", "active": true },
{ "id": "…", "name": "Side Project", "slug": "side-project", "role": "MEMBER", "active": false }
]
}
switch-organization
Switches the organization an OAuth connection acts on, without requiring the user to reconnect or re-authenticate.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | The organization id or slug to switch to (see list-organizations) |
Response
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the switch succeeded |
organization.id | string | The new active organization's id (on success) |
organization.name | string | The new active organization's name (on success) |
organization.slug | string | The new active organization's slug (on success) |
error | string | Failure reason (e.g. not a member, connection not OAuth-based) |
Example
Request:
{
"tool": "switch-organization",
"arguments": { "organizationId": "side-project" }
}
Response:
{
"success": true,
"organization": { "id": "…", "name": "Side Project", "slug": "side-project" }
}