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

# Workspaces

> Manage workspaces and workspace memberships.

# Workspaces

Manage workspaces and workspace memberships.

<script src="/locale-bridge.js" />

The examples use A2A code mode. MCP exposes the same code mode through its `execute` tool.

## Functions

### `workspaces.add`

```text theme={null}
workspaces.add(account_id: str, name: str) -> Workspace
```

Create workspaces.

| Property            | Value                                              | Property          | Value              |
| ------------------- | -------------------------------------------------- | ----------------- | ------------------ |
| Requires permission | `workspace.manage`                                 | Auth required     | `yes`              |
| Execution mode      | `sync`                                             | Capability        | `workspace.manage` |
| Resource type       | `account`                                          | Resource ID field | `account_id`       |
| Public API route    | `POST /v1/public/accounts/{account_id}/workspaces` |                   |                    |

<AccordionGroup>
  <Accordion title="Arguments">
    | Name         | Type  | Required | Description            |
    | ------------ | ----- | -------- | ---------------------- |
    | `account_id` | `str` | yes      | Account UUID           |
    | `name`       | `str` | yes      | Workspace display name |
  </Accordion>

  <Accordion title="Returns">
    | Field        | Type          | Required | Description                          |
    | ------------ | ------------- | -------- | ------------------------------------ |
    | `account_id` | `str`         | yes      | Account UUID that owns the workspace |
    | `id`         | `str`         | yes      | Workspace UUID                       |
    | `name`       | `str`         | yes      | Workspace display name               |
    | `created_at` | `str \| null` | no       | Workspace creation timestamp         |
    | `status`     | `str`         | no       | Workspace lifecycle status           |
    | `updated_at` | `str \| null` | no       | Workspace last update timestamp      |
  </Accordion>

  <Accordion title="A2A example">
    Request:

    ```json theme={null}
    {
      "request_id": "example",
      "session_id": "session_123",
      "code": "workspaces.add(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", name=\"<string>\")"
    }
    ```

    Response:

    ```json theme={null}
    {
      "request_id": "example",
      "status": "completed",
      "result": {
        "last_value": "<string>"
      },
      "responses": [
        {
          "index": 0,
          "function": "workspaces.add",
          "status": "completed",
          "result": "<string>"
        }
      ],
      "complexity_score": 1
    }
    ```
  </Accordion>

  <Accordion title="MCP example">
    Request:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "method": "tools/call",
      "params": {
        "name": "hybridbox_execute",
        "arguments": {
          "code": "workspaces.add(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", name=\"<string>\")"
        }
      }
    }
    ```

    Response:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "result": {
        "content": [
          {
            "type": "text",
            "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": \"<string>\"\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"workspaces.add\",\n      \"status\": \"completed\",\n      \"result\": \"<string>\"\n    }\n  ],\n  \"complexity_score\": 1\n}"
          }
        ],
        "isError": false
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### `workspaces.delete`

```text theme={null}
workspaces.delete(account_id: str, workspace_id: str) -> {}
```

Delete workspaces.

| Property            | Value                                                               | Property          | Value              |
| ------------------- | ------------------------------------------------------------------- | ----------------- | ------------------ |
| Requires permission | `workspace.manage`                                                  | Auth required     | `yes`              |
| Execution mode      | `sync`                                                              | Capability        | `workspace.manage` |
| Resource type       | `account`                                                           | Resource ID field | `account_id`       |
| Public API route    | `DELETE /v1/public/accounts/{account_id}/workspaces/{workspace_id}` |                   |                    |

<AccordionGroup>
  <Accordion title="Arguments">
    | Name           | Type  | Required | Description                        |
    | -------------- | ----- | -------- | ---------------------------------- |
    | `account_id`   | `str` | yes      | Account UUID from the route path   |
    | `workspace_id` | `str` | yes      | Workspace UUID from the route path |
  </Accordion>

  <Accordion title="Returns">
    | Field    | Type | Required | Description |
    | -------- | ---- | -------- | ----------- |
    | `result` | `{}` | yes      |             |
  </Accordion>

  <Accordion title="A2A example">
    Request:

    ```json theme={null}
    {
      "request_id": "example",
      "session_id": "session_123",
      "code": "workspaces.delete(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", workspace_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
    }
    ```

    Response:

    ```json theme={null}
    {
      "request_id": "example",
      "status": "completed",
      "result": {
        "last_value": {}
      },
      "responses": [
        {
          "index": 0,
          "function": "workspaces.delete",
          "status": "completed",
          "result": {}
        }
      ],
      "complexity_score": 1
    }
    ```
  </Accordion>

  <Accordion title="MCP example">
    Request:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "method": "tools/call",
      "params": {
        "name": "hybridbox_execute",
        "arguments": {
          "code": "workspaces.delete(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", workspace_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
        }
      }
    }
    ```

    Response:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "result": {
        "content": [
          {
            "type": "text",
            "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": {}\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"workspaces.delete\",\n      \"status\": \"completed\",\n      \"result\": {}\n    }\n  ],\n  \"complexity_score\": 1\n}"
          }
        ],
        "isError": false
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### `workspaces.get`

```text theme={null}
workspaces.get(account_id: str, workspace_id: str) -> Workspace
```

Get workspaces.

| Property            | Value                                                            | Property          | Value            |
| ------------------- | ---------------------------------------------------------------- | ----------------- | ---------------- |
| Requires permission | `workspace.view`                                                 | Auth required     | `yes`            |
| Execution mode      | `sync`                                                           | Capability        | `workspace.view` |
| Resource type       | `account`                                                        | Resource ID field | `account_id`     |
| Public API route    | `GET /v1/public/accounts/{account_id}/workspaces/{workspace_id}` |                   |                  |

<AccordionGroup>
  <Accordion title="Arguments">
    | Name           | Type  | Required | Description                        |
    | -------------- | ----- | -------- | ---------------------------------- |
    | `account_id`   | `str` | yes      | Account UUID from the route path   |
    | `workspace_id` | `str` | yes      | Workspace UUID from the route path |
  </Accordion>

  <Accordion title="Returns">
    | Field        | Type          | Required | Description                          |
    | ------------ | ------------- | -------- | ------------------------------------ |
    | `account_id` | `str`         | yes      | Account UUID that owns the workspace |
    | `id`         | `str`         | yes      | Workspace UUID                       |
    | `name`       | `str`         | yes      | Workspace display name               |
    | `created_at` | `str \| null` | no       | Workspace creation timestamp         |
    | `status`     | `str`         | no       | Workspace lifecycle status           |
    | `updated_at` | `str \| null` | no       | Workspace last update timestamp      |
  </Accordion>

  <Accordion title="A2A example">
    Request:

    ```json theme={null}
    {
      "request_id": "example",
      "session_id": "session_123",
      "code": "workspaces.get(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", workspace_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
    }
    ```

    Response:

    ```json theme={null}
    {
      "request_id": "example",
      "status": "completed",
      "result": {
        "last_value": "<string>"
      },
      "responses": [
        {
          "index": 0,
          "function": "workspaces.get",
          "status": "completed",
          "result": "<string>"
        }
      ],
      "complexity_score": 1
    }
    ```
  </Accordion>

  <Accordion title="MCP example">
    Request:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "method": "tools/call",
      "params": {
        "name": "hybridbox_execute",
        "arguments": {
          "code": "workspaces.get(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", workspace_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\")"
        }
      }
    }
    ```

    Response:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "result": {
        "content": [
          {
            "type": "text",
            "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": \"<string>\"\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"workspaces.get\",\n      \"status\": \"completed\",\n      \"result\": \"<string>\"\n    }\n  ],\n  \"complexity_score\": 1\n}"
          }
        ],
        "isError": false
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### `workspaces.list`

```text theme={null}
workspaces.list(account_id: str, page?: int, page_size?: int) -> Page[Workspace]
```

List workspaces.

| Property            | Value                                             | Property          | Value            |
| ------------------- | ------------------------------------------------- | ----------------- | ---------------- |
| Requires permission | `workspace.view`                                  | Auth required     | `yes`            |
| Execution mode      | `sync`                                            | Capability        | `workspace.view` |
| Resource type       | `account`                                         | Resource ID field | `account_id`     |
| Public API route    | `GET /v1/public/accounts/{account_id}/workspaces` |                   |                  |

<AccordionGroup>
  <Accordion title="Arguments">
    | Name         | Type  | Required | Description                     |
    | ------------ | ----- | -------- | ------------------------------- |
    | `account_id` | `str` | yes      | Account UUID                    |
    | `page`       | `int` | no       | One-based workspace page number |
    | `page_size`  | `int` | no       | Maximum workspaces per page     |
  </Accordion>

  <Accordion title="Returns">
    | Field       | Type                                                                                                                    | Required | Description                   |
    | ----------- | ----------------------------------------------------------------------------------------------------------------------- | -------- | ----------------------------- |
    | `items`     | `[{"account_id": str, "id": str, "name": str, "created_at"?: str \| null, "status"?: str, "updated_at"?: str \| null}]` | yes      | Workspaces on this page       |
    | `page`      | `int`                                                                                                                   | yes      | Current one-based page number |
    | `page_size` | `int`                                                                                                                   | yes      | Maximum items per page        |
    | `total`     | `int`                                                                                                                   | yes      | Total matching workspaces     |
  </Accordion>

  <Accordion title="A2A example">
    Request:

    ```json theme={null}
    {
      "request_id": "example",
      "session_id": "session_123",
      "code": "workspaces.list(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", page=123, page_size=123)"
    }
    ```

    Response:

    ```json theme={null}
    {
      "request_id": "example",
      "status": "completed",
      "result": {
        "last_value": "<string>"
      },
      "responses": [
        {
          "index": 0,
          "function": "workspaces.list",
          "status": "completed",
          "result": "<string>"
        }
      ],
      "complexity_score": 1
    }
    ```
  </Accordion>

  <Accordion title="MCP example">
    Request:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "method": "tools/call",
      "params": {
        "name": "hybridbox_execute",
        "arguments": {
          "code": "workspaces.list(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", page=123, page_size=123)"
        }
      }
    }
    ```

    Response:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "result": {
        "content": [
          {
            "type": "text",
            "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": \"<string>\"\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"workspaces.list\",\n      \"status\": \"completed\",\n      \"result\": \"<string>\"\n    }\n  ],\n  \"complexity_score\": 1\n}"
          }
        ],
        "isError": false
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### `workspaces.update`

```text theme={null}
workspaces.update(account_id: str, workspace_id: str, name: str) -> Workspace
```

Update workspaces.

| Property            | Value                                                              | Property          | Value              |
| ------------------- | ------------------------------------------------------------------ | ----------------- | ------------------ |
| Requires permission | `workspace.manage`                                                 | Auth required     | `yes`              |
| Execution mode      | `sync`                                                             | Capability        | `workspace.manage` |
| Resource type       | `account`                                                          | Resource ID field | `account_id`       |
| Public API route    | `PATCH /v1/public/accounts/{account_id}/workspaces/{workspace_id}` |                   |                    |

<AccordionGroup>
  <Accordion title="Arguments">
    | Name           | Type  | Required | Description                        |
    | -------------- | ----- | -------- | ---------------------------------- |
    | `account_id`   | `str` | yes      | Account UUID from the route path   |
    | `workspace_id` | `str` | yes      | Workspace UUID from the route path |
    | `name`         | `str` | yes      | Workspace display name             |
  </Accordion>

  <Accordion title="Returns">
    | Field        | Type          | Required | Description                          |
    | ------------ | ------------- | -------- | ------------------------------------ |
    | `account_id` | `str`         | yes      | Account UUID that owns the workspace |
    | `id`         | `str`         | yes      | Workspace UUID                       |
    | `name`       | `str`         | yes      | Workspace display name               |
    | `created_at` | `str \| null` | no       | Workspace creation timestamp         |
    | `status`     | `str`         | no       | Workspace lifecycle status           |
    | `updated_at` | `str \| null` | no       | Workspace last update timestamp      |
  </Accordion>

  <Accordion title="A2A example">
    Request:

    ```json theme={null}
    {
      "request_id": "example",
      "session_id": "session_123",
      "code": "workspaces.update(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", workspace_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", name=\"<string>\")"
    }
    ```

    Response:

    ```json theme={null}
    {
      "request_id": "example",
      "status": "completed",
      "result": {
        "last_value": "<string>"
      },
      "responses": [
        {
          "index": 0,
          "function": "workspaces.update",
          "status": "completed",
          "result": "<string>"
        }
      ],
      "complexity_score": 1
    }
    ```
  </Accordion>

  <Accordion title="MCP example">
    Request:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "method": "tools/call",
      "params": {
        "name": "hybridbox_execute",
        "arguments": {
          "code": "workspaces.update(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", workspace_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", name=\"<string>\")"
        }
      }
    }
    ```

    Response:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "id": "example",
      "result": {
        "content": [
          {
            "type": "text",
            "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": \"<string>\"\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"workspaces.update\",\n      \"status\": \"completed\",\n      \"result\": \"<string>\"\n    }\n  ],\n  \"complexity_score\": 1\n}"
          }
        ],
        "isError": false
      }
    }
    ```
  </Accordion>
</AccordionGroup>
