# Accounts

Inspect account records and account lists.

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

## Functions

### `accounts.get`

```text
accounts.get(account_id: str) -> Account
```

Get accounts.

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

  

### Arguments

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

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `client` | `{"id": str, "name": str}` | yes | Client that owns the account |
| `created_at` | `str` | yes | Account creation timestamp |
| `id` | `str` | yes | Account UUID |
| `name` | `str` | yes | Account display name |
| `status` | `str` | yes | Account lifecycle status |
| `updated_at` | `str` | yes | Account last update timestamp |

  
  

### A2A example

Request:

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

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": {
      "client": {
        "id": "<string>",
        "name": "<string>"
      },
      "created_at": "<string>",
      "id": "<string>",
      "name": "<string>",
      "status": "<string>",
      "updated_at": "<string>"
    }
  },
  "responses": [
    {
      "index": 0,
      "function": "accounts.get",
      "status": "completed",
      "result": {
        "client": {
          "id": "<string>",
          "name": "<string>"
        },
        "created_at": "<string>",
        "id": "<string>",
        "name": "<string>",
        "status": "<string>",
        "updated_at": "<string>"
      }
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "method": "tools/call",
  "params": {
    "name": "hybridbox_execute",
    "arguments": {
      "code": "accounts.get(account_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      \"client\": {\n        \"id\": \"<string>\",\n        \"name\": \"<string>\"\n      },\n      \"created_at\": \"<string>\",\n      \"id\": \"<string>\",\n      \"name\": \"<string>\",\n      \"status\": \"<string>\",\n      \"updated_at\": \"<string>\"\n    }\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"accounts.get\",\n      \"status\": \"completed\",\n      \"result\": {\n        \"client\": {\n          \"id\": \"<string>\",\n          \"name\": \"<string>\"\n        },\n        \"created_at\": \"<string>\",\n        \"id\": \"<string>\",\n        \"name\": \"<string>\",\n        \"status\": \"<string>\",\n        \"updated_at\": \"<string>\"\n      }\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```

  

### `accounts.list`

```text
accounts.list(client_id?: str | null, page?: int, page_size?: int, status?: str | null) -> Page[Account]
```

List accounts.

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

  

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `client_id` | `str \| null` | no | Filter by client UUID |
| `page` | `int` | no | One-based page number |
| `page_size` | `int` | no | Page size |
| `status` | `str \| null` | no | Filter by status |

  
  

### Returns

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `items` | `[{"client": {"id": str, "name": str}, "created_at": str, "id": str, "name": str, "status": str, "updated_at": str}]` | yes | Accounts on this page |
| `page` | `int` | yes | Current one-based page number |
| `page_size` | `int` | yes | Maximum items per page |
| `total` | `int` | yes | Total matching accounts |

  
  

### A2A example

Request:

```json
{
  "request_id": "example",
  "session_id": "session_123",
  "code": "accounts.list(client_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", page=123, page_size=123, status=\"<string>\")"
}
```

Response:

```json
{
  "request_id": "example",
  "status": "completed",
  "result": {
    "last_value": {
      "items": [
        {
          "client": {
            "id": "<string>",
            "name": "<string>"
          },
          "created_at": "<string>",
          "id": "<string>",
          "name": "<string>",
          "status": "<string>",
          "updated_at": "<string>"
        }
      ],
      "page": 123,
      "page_size": 123,
      "total": 123
    }
  },
  "responses": [
    {
      "index": 0,
      "function": "accounts.list",
      "status": "completed",
      "result": {
        "items": [
          {
            "client": {
              "id": "<string>",
              "name": "<string>"
            },
            "created_at": "<string>",
            "id": "<string>",
            "name": "<string>",
            "status": "<string>",
            "updated_at": "<string>"
          }
        ],
        "page": 123,
        "page_size": 123,
        "total": 123
      }
    }
  ],
  "complexity_score": 1
}
```

  
  

### MCP example

Request:

```json
{
  "jsonrpc": "2.0",
  "id": "example",
  "method": "tools/call",
  "params": {
    "name": "hybridbox_execute",
    "arguments": {
      "code": "accounts.list(client_id=\"3c90c3cc-0d44-4b50-8888-8dd25736052a\", page=123, page_size=123, status=\"<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\": {\n      \"items\": [\n        {\n          \"client\": {\n            \"id\": \"<string>\",\n            \"name\": \"<string>\"\n          },\n          \"created_at\": \"<string>\",\n          \"id\": \"<string>\",\n          \"name\": \"<string>\",\n          \"status\": \"<string>\",\n          \"updated_at\": \"<string>\"\n        }\n      ],\n      \"page\": 123,\n      \"page_size\": 123,\n      \"total\": 123\n    }\n  },\n  \"responses\": [\n    {\n      \"index\": 0,\n      \"function\": \"accounts.list\",\n      \"status\": \"completed\",\n      \"result\": {\n        \"items\": [\n          {\n            \"client\": {\n              \"id\": \"<string>\",\n              \"name\": \"<string>\"\n            },\n            \"created_at\": \"<string>\",\n            \"id\": \"<string>\",\n            \"name\": \"<string>\",\n            \"status\": \"<string>\",\n            \"updated_at\": \"<string>\"\n          }\n        ],\n        \"page\": 123,\n        \"page_size\": 123,\n        \"total\": 123\n      }\n    }\n  ],\n  \"complexity_score\": 1\n}"
      }
    ],
    "isError": false
  }
}
```
