# Tags

Manage resource tags and tag assignments.

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

## Functions

### `tags.add`

```text
tags.add(account_id: str, tag_name: str, color_hex?: str, description?: str | null) -> Tag
```

Create tags.

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

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | `str` | yes | Account UUID from the route path |
| `tag_name` | `str` | yes | Tag display name |
| `color_hex` | `str` | no | Tag color as a hex code |
| `description` | `str \| null` | no | Optional tag description |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `color_hex` | `str` | yes | Tag color as a hex code |
| `id` | `str` | yes | Tag UUID |
| `name` | `str` | yes | Tag display name |
| `created_at` | `str \| null` | no | Tag creation timestamp |
| `description` | `str \| null` | no | Optional tag description |
| `updated_at` | `str \| null` | no | Tag last update timestamp |

  
  

### A2A example

Request:

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

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": "<string>"
  },
  "responses": [
    {
      "index": 0,
      "function": "tags.add",
      "status": "completed",
      "result": "<string>"
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

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

Response:

```json
{
  "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\": \"tags.add\",\n      \"status\": \"completed\",\n      \"result\": \"<string>\"\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```

  

### `tags.delete`

```text
tags.delete(account_id: str, tag_id: str) -> {}
```

Delete tags.

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

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | `str` | yes | Account UUID from the route path |
| `tag_id` | `str` | yes | Tag UUID from the route path |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `result` | `{}` | yes |  |

  
  

### A2A example

Request:

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

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": {}
  },
  "responses": [
    {
      "index": 0,
      "function": "tags.delete",
      "status": "completed",
      "result": {}
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

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

Response:

```json
{
  "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\": \"tags.delete\",\n      \"status\": \"completed\",\n      \"result\": {}\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```

  

### `tags.domains.assign`

```text
tags.domains.assign(account_id: str, tag_id: str, domain_ids: [str]) -> Tag
```

Assign domains.

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

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | `str` | yes | Account UUID from the route path |
| `tag_id` | `str` | yes | Tag UUID from the route path |
| `domain_ids` | `[str]` | yes | Domain UUIDs or domain names to assign or unassign. |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `domain_ids` | `[str]` | yes | Domain UUIDs affected by the assignment |
| `tag_id` | `str` | yes | Tag UUID |

  
  

### A2A example

Request:

```json
{
  "request_id": "example",
  "session_id": "session_123",
  "code": "tags.domains.assign(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", tag_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", domain_ids=\"example.com\")"
}
```

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": {
      "domain_ids": [
        "<string>"
      ],
      "tag_id": "<string>"
    }
  },
  "responses": [
    {
      "index": 0,
      "function": "tags.domains.assign",
      "status": "completed",
      "result": {
        "domain_ids": [
          "<string>"
        ],
        "tag_id": "<string>"
      }
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "method": "tools/call",
  "params": {
    "name": "hybridbox_execute",
    "arguments": {
      "code": "tags.domains.assign(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", tag_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", domain_ids=\"example.com\")"
    }
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"request_id\": \"example\",\n  \"status\": \"completed\",\n  \"result\": {\n    \"last_value\": {\n      \"domain_ids\": [\n        \"<string>\"\n      ],\n      \"tag_id\": \"<string>\"\n    }\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"tags.domains.assign\",\n      \"status\": \"completed\",\n      \"result\": {\n        \"domain_ids\": [\n          \"<string>\"\n        ],\n        \"tag_id\": \"<string>\"\n      }\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```

  

### `tags.domains.unassign`

```text
tags.domains.unassign(account_id: str, tag_id: str, domain_ids: [str]) -> {}
```

Unassign domains.

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

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | `str` | yes | Account UUID from the route path |
| `tag_id` | `str` | yes | Tag UUID from the route path |
| `domain_ids` | `[str]` | yes | Domain UUIDs or domain names to assign or unassign. |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `result` | `{}` | yes |  |

  
  

### A2A example

Request:

```json
{
  "request_id": "example",
  "session_id": "session_123",
  "code": "tags.domains.unassign(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", tag_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", domain_ids=\"example.com\")"
}
```

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": {}
  },
  "responses": [
    {
      "index": 0,
      "function": "tags.domains.unassign",
      "status": "completed",
      "result": {}
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "method": "tools/call",
  "params": {
    "name": "hybridbox_execute",
    "arguments": {
      "code": "tags.domains.unassign(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", tag_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", domain_ids=\"example.com\")"
    }
  }
}
```

Response:

```json
{
  "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\": \"tags.domains.unassign\",\n      \"status\": \"completed\",\n      \"result\": {}\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```

  

### `tags.list`

```text
tags.list(account_id: str, page?: int, page_size?: int) -> Page[Tag]
```

List tags.

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

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | `str` | yes | Account UUID from the route path |
| `page` | `int` | no | One-based tag page number |
| `page_size` | `int` | no | Maximum tags per page |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | `[{"color_hex": str, "id": str, "name": str, "created_at"?: str \| null, "description"?: str \| null, "updated_at"?: str \| null}]` | yes | Tags on this page |
| `page` | `int` | yes | Current one-based page number |
| `page_size` | `int` | yes | Maximum items per page |
| `total` | `int` | yes | Total matching tags |

  
  

### A2A example

Request:

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

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": "<string>"
  },
  "responses": [
    {
      "index": 0,
      "function": "tags.list",
      "status": "completed",
      "result": "<string>"
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

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

Response:

```json
{
  "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\": \"tags.list\",\n      \"status\": \"completed\",\n      \"result\": \"<string>\"\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```

  

### `tags.update`

```text
tags.update(account_id: str, tag_id: str, color_hex?: str | null, description?: str | null, tag_name?: str | null) -> Tag
```

Update tags.

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

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `account_id` | `str` | yes | Account UUID from the route path |
| `tag_id` | `str` | yes | Tag UUID from the route path |
| `color_hex` | `str \| null` | no | Tag color as a hex code |
| `description` | `str \| null` | no | Optional tag description |
| `tag_name` | `str \| null` | no | Tag display name |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `color_hex` | `str` | yes | Tag color as a hex code |
| `id` | `str` | yes | Tag UUID |
| `name` | `str` | yes | Tag display name |
| `created_at` | `str \| null` | no | Tag creation timestamp |
| `description` | `str \| null` | no | Optional tag description |
| `updated_at` | `str \| null` | no | Tag last update timestamp |

  
  

### A2A example

Request:

```json
{
  "request_id": "example",
  "session_id": "session_123",
  "code": "tags.update(account_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", tag_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", color_hex=\"<string>\", description=\"<string>\", tag_name=\"<string>\")"
}
```

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": "<string>"
  },
  "responses": [
    {
      "index": 0,
      "function": "tags.update",
      "status": "completed",
      "result": "<string>"
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

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

Response:

```json
{
  "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\": \"tags.update\",\n      \"status\": \"completed\",\n      \"result\": \"<string>\"\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```
