Identity tools
Three tools describing you and the organizations you can act in. All three require a signed-in person; a machine credential is refused.
get_viewer
Section titled “get_viewer”Get the authenticated user’s profile, including their active organization and role.
Arguments: none.
Returns:
| Field | Type | Notes |
|---|---|---|
id | string | User id. |
email | string | |
name | string | |
image | string | null | Avatar URL. |
organization | object | null | { id, name, slug }. |
role | string | null | The viewer’s role in that organization. |
The organization reported is the first of the user’s organizations — the oldest, not a chosen
active one. When you need to pick one, use list_organizations instead.
Returns an error block reading User not found if the profile cannot be resolved.
list_organizations
Section titled “list_organizations”List all organizations the authenticated user belongs to.
Arguments: none.
Returns: an array of { id, name, slug, logo }, up to 100.
This is the tool that answers “which organization should I file into”. The id values it returns
are what every organization_id argument elsewhere expects.
get_organization
Section titled “get_organization”Get organization details by slug, including members.
Arguments:
| Name | Type | Required | Notes |
|---|---|---|---|
slug | string | yes | Organization slug (URL identifier), not the id. |
Returns: { id, name, slug, members } where members is an array of
{ id, name, email, role }, up to 100.
Returns an error block reading Organization "<slug>" not found if no organization matches, which
includes an organization that exists but you cannot see.