# Get Workspace context

Canonical URL: https://sosoapi.ai/docs/mcp/get-workspace-context

`sosoapi_get_workspace_context`

List the Workspaces the signed-in user belongs to and which one is active. Use this when workspace_id is unknown; reuse live context instead of repeating both context reads. The active Workspace it reports is the selection a person made in the web app, not a default for your calls: pass workspace_id explicitly. It is not purely a read: for an account with no Workspace it creates the first one.

## Profiles and transports

Profiles: core, full

Transports: stdio, http

Choose core or full to control which tools your client sees; this does not change its permissions. Local file upload requires stdio and is unavailable over HTTP. Set SOSOAPI_OUTPUT_SCHEMAS=1 to include output schemas in discovery. Tools return structured results with or without that setting.

## Permissions and side effects

Annotations help clients describe a tool. Each call still checks the user’s authentication, role, resource access and capability grants.

```json
{
  "readOnlyHint": false,
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false
}
```

`/identity-api/workspace/list` — agent:operate; synchronous_http_response

## Input fields

```json
{
  "type": "object",
  "properties": {
    "include_version": {
      "description": "Optional. true adds the resource version to the answer.",
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

## Structured output

This schema describes structuredContent in a successful tool result. The MCP response also includes content and may set isError when a call fails. For publishing, read the post’s final result rather than treating an accepted request or text response as confirmation. The linked API operation explains permissions and retry rules.

```json
{
  "type": "object",
  "properties": {
    "active_workspace_id": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "workspaces": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "editor",
              "reviewer",
              "viewer"
            ]
          },
          "version": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "slug",
          "name",
          "role"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "active_workspace_id",
    "workspaces"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false
}
```

## Example tool call

These examples use fictional values checked against the schemas. Replace the IDs with ones you are authorized to use, the media with ready assets and the dates with your confirmed publishing time. Check the account’s eligibility before submitting a write. This page sends no API requests.

```json
{
  "name": "sosoapi_get_workspace_context",
  "arguments": {}
}
```

structuredContent

```json
{
  "active_workspace_id": null,
  "workspaces": []
}
```

## Underlying API operations

- [/identity-api/workspace/list](https://sosoapi.ai/docs/api/identity-api-workspace-list)
